summaryrefslogtreecommitdiff
path: root/library/src/text
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-11 17:42:40 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-11 18:29:48 +0100
commit529d3e10c6b4d973e88b6c295eb22a45ea426e42 (patch)
tree1815aa9336e71565e24d94bacccb98f09e91b693 /library/src/text
parent8e5f446544fd147277ed2e4208c7ea793cc846a7 (diff)
Section references
Diffstat (limited to 'library/src/text')
-rw-r--r--library/src/text/raw.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/library/src/text/raw.rs b/library/src/text/raw.rs
index 99fb89d2..3f03ba8e 100644
--- a/library/src/text/raw.rs
+++ b/library/src/text/raw.rs
@@ -35,7 +35,7 @@ use crate::prelude::*;
///
/// Display: Raw Text / Code
/// Category: text
-#[node(Prepare, Show, Finalize)]
+#[node(Synthesize, Show, Finalize)]
pub struct RawNode {
/// The raw text.
///
@@ -120,11 +120,9 @@ impl RawNode {
}
}
-impl Prepare for RawNode {
- fn prepare(&self, _: &mut Vt, styles: StyleChain) -> SourceResult<Content> {
- let mut node = self.clone().pack();
- node.push_field("lang", self.lang(styles).clone());
- Ok(node)
+impl Synthesize for RawNode {
+ fn synthesize(&self, _: &mut Vt, styles: StyleChain) -> Content {
+ self.clone().with_lang(self.lang(styles)).pack()
}
}