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

Method debug_raw_text

src/engine.rs:7201–7211  ·  view source on GitHub ↗

Helper: emit a text element from a string (e.g. element IDs or text previews). Escapes text-styling characters when that feature is active.

(&mut self, text: &str, config_index: usize)

Source from the content-addressed store, hash-verified

7199 /// or text previews). Escapes text-styling characters when that feature is
7200 /// active.
7201 fn debug_raw_text(&mut self, text: &str, config_index: usize) {
7202 #[cfg(feature = "text-styling")]
7203 {
7204 let escaped = Self::debug_escape_str(text);
7205 self.open_text_element(&escaped, config_index);
7206 }
7207 #[cfg(not(feature = "text-styling"))]
7208 {
7209 self.open_text_element(text, config_index);
7210 }
7211 }
7212
7213 /// Helper: format a number as a string and emit a text element.
7214 fn debug_int_text(&mut self, value: f32, config_index: usize) {

Calls 1

open_text_elementMethod · 0.80

Tested by

no test coverage detected