diff options
Diffstat (limited to 'crates/typst-eval')
| -rw-r--r-- | crates/typst-eval/src/markup.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/typst-eval/src/markup.rs b/crates/typst-eval/src/markup.rs index 25ea5751..3a5ebe1f 100644 --- a/crates/typst-eval/src/markup.rs +++ b/crates/typst-eval/src/markup.rs @@ -11,6 +11,7 @@ use typst_library::text::{ LinebreakElem, RawContent, RawElem, SmartQuoteElem, SpaceElem, TextElem, }; use typst_syntax::ast::{self, AstNode}; +use typst_utils::PicoStr; use crate::{Eval, Vm}; @@ -204,7 +205,7 @@ impl Eval for ast::Label<'_> { type Output = Value; fn eval(self, _: &mut Vm) -> SourceResult<Self::Output> { - Ok(Value::Label(Label::new(self.get()))) + Ok(Value::Label(Label::new(PicoStr::intern(self.get())))) } } @@ -212,7 +213,7 @@ impl Eval for ast::Ref<'_> { type Output = Content; fn eval(self, vm: &mut Vm) -> SourceResult<Self::Output> { - let target = Label::new(self.target()); + let target = Label::new(PicoStr::intern(self.target())); let mut elem = RefElem::new(target); if let Some(supplement) = self.supplement() { elem.push_supplement(Smart::Custom(Some(Supplement::Content( |
