MCPcopy Create free account
hub / github.com/daisy/MathCAT / parse_mathml_string

Function parse_mathml_string

src/chemistry.rs:1584–1598  ·  view source on GitHub ↗
(test: &str, test_mathml: F)

Source from the content-addressed store, hash-verified

1582 use super::*;
1583
1584 fn parse_mathml_string<F>(test: &str, test_mathml: F) -> bool
1585 where F: Fn(Element) -> bool {
1586 use sxd_document::parser;
1587 use crate::interface::{get_element, trim_element};
1588
1589 let new_package = parser::parse(&test);
1590 if let Err(e) = new_package {
1591 panic!("Invalid MathML input:\n{}\nError is: {}", &test, &e.to_string());
1592 }
1593
1594 let new_package = new_package.unwrap();
1595 let mathml = get_element(&new_package);
1596 trim_element(&mathml);
1597 return test_mathml(mathml);
1598 }
1599
1600 #[test]
1601 fn test_noble_element() {

Callers

nothing calls this directly

Calls 2

get_elementFunction · 0.85
trim_elementFunction · 0.85

Tested by

no test coverage detected