diff options
Diffstat (limited to 'library/src/text')
| -rw-r--r-- | library/src/text/raw.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/src/text/raw.rs b/library/src/text/raw.rs index 796180b4..1cec723e 100644 --- a/library/src/text/raw.rs +++ b/library/src/text/raw.rs @@ -36,7 +36,7 @@ use crate::prelude::*; /// /// Display: Raw Text / Code /// Category: text -#[element(Synthesize, Show, Finalize, LocalName, Figurable)] +#[element(Synthesize, Show, Finalize, LocalName, Figurable, PlainText)] pub struct RawElem { /// The raw text. /// @@ -246,6 +246,12 @@ impl LocalName for RawElem { impl Figurable for RawElem {} +impl PlainText for RawElem { + fn plain_text(&self, text: &mut EcoString) { + text.push_str(&self.text()); + } +} + /// Highlight a syntax node in a theme by calling `f` with ranges and their /// styles. fn highlight_themed<F>( |
