Merge pull request #15 from Trivernis/develop
Fixes to monospace and block elementspull/17/head v0.32.2
commit
673a7527d6
@ -1,6 +1,15 @@
|
|||||||
|
use regex::Regex;
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! parse {
|
macro_rules! parse {
|
||||||
($str:expr) => {
|
($str:expr) => {
|
||||||
Parser::new($str.to_string(), None).parse()
|
Parser::new($str.to_string(), None).parse()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Removes a single backslash from the given content
|
||||||
|
pub(crate) fn remove_single_backlslash<S: ToString>(content: S) -> String {
|
||||||
|
let content = content.to_string();
|
||||||
|
lazy_static::lazy_static! {static ref R: Regex = Regex::new(r"\\(?P<c>[^\\])").unwrap();}
|
||||||
|
|
||||||
|
R.replace_all(&*content, "$c").to_string()
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue