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

Function braille_replace_chars

src/speech.rs:2487–2494  ·  view source on GitHub ↗

Hack to allow replacement of `str` with braille chars.

(str: &str, mathml: Element)

Source from the content-addressed store, hash-verified

2485
2486// Hack to allow replacement of `str` with braille chars.
2487pub fn braille_replace_chars(str: &str, mathml: Element) -> Result<String> {
2488 return BRAILLE_RULES.with(|rules| {
2489 let rules = rules.borrow();
2490 let new_package = Package::new();
2491 let mut rules_with_context = SpeechRulesWithContext::new(&rules, new_package.as_document(), "");
2492 return rules_with_context.replace_chars(str, mathml);
2493 })
2494}
2495
2496
2497

Callers 3

get_braille_ueb_charsMethod · 0.85
get_braille_cmu_charsMethod · 0.85

Calls 1

replace_charsMethod · 0.80

Tested by

no test coverage detected