summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2025-01-24 13:31:03 +0100
committerGitHub <noreply@github.com>2025-01-24 12:31:03 +0000
commit176b070c779ef8aa4515c8ff062b17ca9114fd3f (patch)
treee8914eda708f508e17428549862bce8ea44d38d9 /crates
parent26e65bfef5b1da7f6c72e1409237cf03fb5d6069 (diff)
Fix space collapsing for explicit paragraphs (#5749)
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-realize/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-realize/src/lib.rs b/crates/typst-realize/src/lib.rs
index 754e89aa..50685a96 100644
--- a/crates/typst-realize/src/lib.rs
+++ b/crates/typst-realize/src/lib.rs
@@ -729,8 +729,8 @@ fn finish(s: &mut State) -> SourceResult<()> {
}
})?;
- // In math, spaces are top-level.
- if let RealizationKind::Math = s.kind {
+ // In paragraph and math realization, spaces are top-level.
+ if matches!(s.kind, RealizationKind::LayoutPar | RealizationKind::Math) {
collapse_spaces(&mut s.sink, 0);
}