diff options
| author | bluebear94 <uruwi@protonmail.com> | 2023-07-06 03:37:19 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-06 09:37:19 +0200 |
| commit | a4756d8576199eaee7cc82ed2a15689d94617798 (patch) | |
| tree | 4714641a592d29f74e341ec9214e49e20419aa40 /crates/typst-library/src/math/mod.rs | |
| parent | 5bdad06d9202ab2af728778ab84acc385c439c64 (diff) | |
Add support for weak elements in math (#1633)
Diffstat (limited to 'crates/typst-library/src/math/mod.rs')
| -rw-r--r-- | crates/typst-library/src/math/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/typst-library/src/math/mod.rs b/crates/typst-library/src/math/mod.rs index 0429265f..f1676b91 100644 --- a/crates/typst-library/src/math/mod.rs +++ b/crates/typst-library/src/math/mod.rs @@ -47,6 +47,7 @@ use crate::meta::{ Count, Counter, CounterUpdate, LocalName, Numbering, Outlinable, Refable, }; use crate::prelude::*; +use crate::shared::BehavedBuilder; use crate::text::{ families, variant, FontFamily, FontList, LinebreakElem, SpaceElem, TextElem, TextSize, }; @@ -414,7 +415,11 @@ impl LayoutMath for Content { } if let Some(children) = self.to_sequence() { + let mut bb = BehavedBuilder::new(); for child in children { + bb.push(child.clone(), StyleChain::default()); + } + for (child, _) in bb.finish().0.iter() { child.layout_math(ctx)?; } return Ok(()); |
