compilation
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending

This commit is contained in:
Mylloon 2023-04-22 02:42:09 +02:00
parent 687250cb35
commit 6ab1d42c75
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -82,6 +82,7 @@ pub fn read(raw_text: &str) -> File {
info: metadata,
mermaid: check_mermaid(root, mermaid_name.to_owned()),
syntax_highlight: check_code(root, &[mermaid_name.to_owned()]),
math: check_math(root),
},
content: String::from_utf8(html).unwrap(),
}
@ -133,3 +134,8 @@ fn check_code<'a>(root: &'a AstNode<'a>, blacklist: &[String]) -> bool {
_ => false,
})
}
/// Check recursively if maths is in the AST
fn check_math<'a>(root: &'a AstNode<'a>) -> bool {
root.children().any(|_node| false)
}