diff options
| author | sitandr <60141933+sitandr@users.noreply.github.com> | 2023-08-26 18:36:52 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-26 17:36:52 +0200 |
| commit | b2d6cb58dcffbe297fecf07c2e8d8db5a0340c05 (patch) | |
| tree | 1b7655a4d7b1aca469b81fa9743ab6a2a46ca583 /crates/typst-library | |
| parent | 45bd58fbaac4419a45246865cf44ded7920d5b84 (diff) | |
Fix weak spacing broken in math (#1966)
Diffstat (limited to 'crates/typst-library')
| -rw-r--r-- | crates/typst-library/src/math/mod.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/typst-library/src/math/mod.rs b/crates/typst-library/src/math/mod.rs index 1f87ff81..40df524f 100644 --- a/crates/typst-library/src/math/mod.rs +++ b/crates/typst-library/src/math/mod.rs @@ -418,11 +418,12 @@ impl LayoutMath for Content { return realized.layout_math(ctx); } - if let Some(children) = self.to_sequence() { + if self.is_sequence() { let mut bb = BehavedBuilder::new(); - for child in children { - bb.push(child.clone(), StyleChain::default()); - } + self.sequence_recursive_for_each(&mut |child: &Content| { + bb.push(child.clone(), StyleChain::default()) + }); + for (child, _) in bb.finish().0.iter() { child.layout_math(ctx)?; } |
