summaryrefslogtreecommitdiff
path: root/crates/typst-realize/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2025-03-07 09:22:42 +0100
committerGitHub <noreply@github.com>2025-03-07 08:22:42 +0000
commite1a9166e1d6a24076796efaf4eec073567bfb037 (patch)
treec7003c65733ef0443ed99584fe2f3b4cc876cc67 /crates/typst-realize/src
parent6271cdceae146efe75942ebde7712a942627c42f (diff)
Hotfix for labels on symbols (#6015)
Diffstat (limited to 'crates/typst-realize/src')
-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);
}