summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/model
diff options
context:
space:
mode:
authorPgBiel <9021226+PgBiel@users.noreply.github.com>2025-06-09 10:46:29 -0300
committerGitHub <noreply@github.com>2025-06-09 13:46:29 +0000
commit6725061841e327227a49f90134136264a5b8c584 (patch)
tree693c2f6a185a03f33d7379f2299b18a2dfdceecd /crates/typst-library/src/model
parent494e6a64225261add59c3c9b1cd923bfdfa77961 (diff)
Pin colspan and rowspan for blank cells (#6401)
Diffstat (limited to 'crates/typst-library/src/model')
-rw-r--r--crates/typst-library/src/model/table.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/typst-library/src/model/table.rs b/crates/typst-library/src/model/table.rs
index 6f4461bd..37323089 100644
--- a/crates/typst-library/src/model/table.rs
+++ b/crates/typst-library/src/model/table.rs
@@ -770,7 +770,14 @@ impl Show for Packed<TableCell> {
impl Default for Packed<TableCell> {
fn default() -> Self {
- Packed::new(TableCell::new(Content::default()))
+ Packed::new(
+ // Explicitly set colspan and rowspan to ensure they won't be
+ // overridden by set rules (default cells are created after
+ // colspans and rowspans are processed in the resolver)
+ TableCell::new(Content::default())
+ .with_colspan(NonZeroUsize::ONE)
+ .with_rowspan(NonZeroUsize::ONE),
+ )
}
}