summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-realize/src/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/typst-realize/src/lib.rs b/crates/typst-realize/src/lib.rs
index 50685a96..151ae76b 100644
--- a/crates/typst-realize/src/lib.rs
+++ b/crates/typst-realize/src/lib.rs
@@ -326,7 +326,10 @@ fn visit_math_rules<'a>(
// Symbols in non-math content transparently convert to `TextElem` so we
// don't have to handle them in non-math layout.
if let Some(elem) = content.to_packed::<SymbolElem>() {
- let text = TextElem::packed(elem.text).spanned(elem.span());
+ let mut text = TextElem::packed(elem.text).spanned(elem.span());
+ if let Some(label) = elem.label() {
+ text.set_label(label);
+ }
visit(s, s.store(text), styles)?;
return Ok(true);
}