diff --git a/crates/typst/src/layout/rel.rs b/crates/typst/src/layout/rel.rs index fa2a56e22..ed3675885 100644 --- a/crates/typst/src/layout/rel.rs +++ b/crates/typst/src/layout/rel.rs @@ -100,11 +100,7 @@ impl Debug for Rel { impl Repr for Rel { fn repr(&self) -> EcoString { - match (self.rel.is_zero(), self.abs.is_zero()) { - (false, false) => eco_format!("{} + {}", self.rel.repr(), self.abs.repr()), - (false, true) => self.rel.repr(), - (true, _) => self.abs.repr(), - } + eco_format!("{} + {}", self.rel.repr(), self.abs.repr()) } } diff --git a/tests/ref/compiler/content-field.png b/tests/ref/compiler/content-field.png index 3095ba8c9..d582cfa19 100644 Binary files a/tests/ref/compiler/content-field.png and b/tests/ref/compiler/content-field.png differ diff --git a/tests/ref/compiler/repr.png b/tests/ref/compiler/repr.png index c90cc3cdb..3b1a571ed 100644 Binary files a/tests/ref/compiler/repr.png and b/tests/ref/compiler/repr.png differ diff --git a/tests/ref/layout/grid-cell.png b/tests/ref/layout/grid-cell.png index 07508b400..563d6721e 100644 Binary files a/tests/ref/layout/grid-cell.png and b/tests/ref/layout/grid-cell.png differ diff --git a/tests/ref/layout/table-cell.png b/tests/ref/layout/table-cell.png index 647a2e105..d0c393636 100644 Binary files a/tests/ref/layout/table-cell.png and b/tests/ref/layout/table-cell.png differ diff --git a/tests/typ/compiler/repr.typ b/tests/typ/compiler/repr.typ index 13593a868..0cdd4bcf8 100644 --- a/tests/typ/compiler/repr.typ +++ b/tests/typ/compiler/repr.typ @@ -22,6 +22,10 @@ #1.7em \ #(1cm + 0em) \ #(2em + 10pt) \ +#(100% + (2em + 2pt)) \ +#(100% + 0pt) \ +#(100% - 2em + 2pt) \ +#(100% - 2pt) \ #2.3fr ---