summaryrefslogtreecommitdiff
path: root/library/src/text
diff options
context:
space:
mode:
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()
}
}