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

Function trim_doc

src/interface.rs:404–412  ·  view source on GitHub ↗
(doc: &Document)

Source from the content-addressed store, hash-verified

402
403#[allow(dead_code)]
404fn trim_doc(doc: &Document) {
405 for root_child in doc.root().children() {
406 if let ChildOfRoot::Element(e) = root_child {
407 trim_element(&e);
408 } else {
409 doc.root().remove_child(root_child); // comment or processing instruction
410 }
411 };
412}
413
414/// Not really meant to be public -- used by tests in some packages
415pub fn trim_element(e: &Element) {

Callers 2

are_parsed_strs_equalFunction · 0.85
trim_differsFunction · 0.85

Calls 1

trim_elementFunction · 0.85

Tested by 1

trim_differsFunction · 0.68