MCPcopy Create free account
hub / github.com/TheRedDeveloper/ply-engine / debug_text

Method debug_text

src/engine.rs:7186–7196  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Calls 1

open_text_elementMethod · 0.80

Tested by

no test coverage detected