summaryrefslogtreecommitdiff
path: root/library/src/text/misc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/src/text/misc.rs')
-rw-r--r--library/src/text/misc.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/library/src/text/misc.rs b/library/src/text/misc.rs
index e1d9c0f2..a707d130 100644
--- a/library/src/text/misc.rs
+++ b/library/src/text/misc.rs
@@ -5,7 +5,7 @@ use crate::prelude::*;
///
/// Display: Space
/// Category: text
-#[element(Unlabellable, Behave)]
+#[element(Behave, Unlabellable, PlainText)]
pub struct SpaceElem {}
impl Behave for SpaceElem {
@@ -16,6 +16,12 @@ impl Behave for SpaceElem {
impl Unlabellable for SpaceElem {}
+impl PlainText for SpaceElem {
+ fn plain_text(&self, text: &mut EcoString) {
+ text.push(' ');
+ }
+}
+
/// Inserts a line break.
///
/// Advances the paragraph to the next line. A single trailing line break at the