Hack to allow replacement of `str` with braille chars.
(str: &str, mathml: Element)
| 2485 | |
| 2486 | // Hack to allow replacement of `str` with braille chars. |
| 2487 | pub 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 |
no test coverage detected