diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-04-17 13:25:31 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-04-17 13:26:49 +0200 |
| commit | 9bdc4a7de0fb685fa2b8d02280e70aa0b5d92bf9 (patch) | |
| tree | e67c75c32183e734272943107ad2d034b1e8e818 /library/src/text/misc.rs | |
| parent | 428c55b6eed3536bb228924c6fb0ad6cea6d6d4b (diff) | |
Write PDF outline
Diffstat (limited to 'library/src/text/misc.rs')
| -rw-r--r-- | library/src/text/misc.rs | 8 |
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 |
