This commit is contained in:
parent
687250cb35
commit
6ab1d42c75
1 changed files with 6 additions and 0 deletions
|
@ -82,6 +82,7 @@ pub fn read(raw_text: &str) -> File {
|
||||||
info: metadata,
|
info: metadata,
|
||||||
mermaid: check_mermaid(root, mermaid_name.to_owned()),
|
mermaid: check_mermaid(root, mermaid_name.to_owned()),
|
||||||
syntax_highlight: check_code(root, &[mermaid_name.to_owned()]),
|
syntax_highlight: check_code(root, &[mermaid_name.to_owned()]),
|
||||||
|
math: check_math(root),
|
||||||
},
|
},
|
||||||
content: String::from_utf8(html).unwrap(),
|
content: String::from_utf8(html).unwrap(),
|
||||||
}
|
}
|
||||||
|
@ -133,3 +134,8 @@ fn check_code<'a>(root: &'a AstNode<'a>, blacklist: &[String]) -> bool {
|
||||||
_ => false,
|
_ => false,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Check recursively if maths is in the AST
|
||||||
|
fn check_math<'a>(root: &'a AstNode<'a>) -> bool {
|
||||||
|
root.children().any(|_node| false)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue