Helper: emit a text element with a static string. When `text-styling` is enabled the string is escaped first so that braces and pipes are rendered literally.
(&mut self, text: &'static str, config_index: usize)
| 7184 | /// When `text-styling` is enabled the string is escaped first so that |
| 7185 | /// braces and pipes are rendered literally. |
| 7186 | fn debug_text(&mut self, text: &'static str, config_index: usize) { |
| 7187 | #[cfg(feature = "text-styling")] |
| 7188 | { |
| 7189 | let escaped = Self::debug_escape_str(text); |
| 7190 | self.open_text_element(&escaped, config_index); |
| 7191 | } |
| 7192 | #[cfg(not(feature = "text-styling"))] |
| 7193 | { |
| 7194 | self.open_text_element(text, config_index); |
| 7195 | } |
| 7196 | } |
| 7197 | |
| 7198 | /// Helper: emit a text element from a string (e.g. element IDs |
| 7199 | /// or text previews). Escapes text-styling characters when that feature is |
no test coverage detected