summaryrefslogtreecommitdiff
path: root/library/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-05-22 16:03:22 +0200
committerLaurenz <laurmaedje@gmail.com>2023-05-22 16:05:13 +0200
commita3227f4ef3b759faa506109c0235df5ffd2a4b7d (patch)
treee62d8d04e389cfb71a4ec3213dc322366b920a8a /library/src
parentef1bf742f6b73e60a8adb40281140314dc3e7ff4 (diff)
Fix PDF outline bugs
Fixes #1098 Fixes #1143 Fixes #1151
Diffstat (limited to 'library/src')
-rw-r--r--library/src/text/raw.rs8
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>(