Hotfix for labels on symbols (#6015)

This commit is contained in:
Laurenz 2025-03-07 09:22:42 +01:00
parent e0074dfc01
commit fe94b2b54f
3 changed files with 8 additions and 1 deletions

View File

@ -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);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

View File

@ -151,3 +151,7 @@
--- symbol-sect-deprecated ---
// Warning: 5-9 `sect` is deprecated, use `inter` instead
$ A sect B = A inter B $
--- issue-5930-symbol-label ---
#emoji.face<lab>
#context test(query(<lab>).first().text, "😀")