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

Method nav_node_adjust

src/speech.rs:2260–2273  ·  view source on GitHub ↗
(&self, speech: T, mathml: Element<'c>)

Source from the content-addressed store, hash-verified

2258 }
2259
2260 fn nav_node_adjust<T:TreeOrString<'c, 'm, T>>(&self, speech: T, mathml: Element<'c>) -> T {
2261 if let Some(id) = mathml.attribute_value("id") {
2262 if self.nav_node_id == id {
2263 if self.speech_rules.name == RulesFor::Braille {
2264 let highlight_style = self.speech_rules.pref_manager.borrow().pref_to_string("BrailleNavHighlight");
2265 return T::highlight_braille(speech, highlight_style);
2266 } else {
2267 return T::mark_nav_speech(speech)
2268 }
2269 }
2270 }
2271 return speech;
2272
2273 }
2274
2275 fn highlight_braille_string(braille: String, highlight_style: String) -> String {
2276 // add dots 7 & 8 to the Unicode braille (28xx)

Callers 1

find_matchMethod · 0.80

Calls 1

pref_to_stringMethod · 0.80

Tested by

no test coverage detected