diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs index 6170a34d..2d6bd96d 100644 --- a/library/src/layout/par.rs +++ b/library/src/layout/par.rs @@ -609,7 +609,10 @@ fn collect<'a>( elem.text().chars().next() } else if child.is::() { Some('"') - } else if child.is::() || child.is::() { + } else if child.is::() + || child.is::() + || child.is::() + { Some(SPACING_REPLACE) } else { Some(OBJ_REPLACE) diff --git a/tests/ref/bugs/smartquotes-on-newline.png b/tests/ref/bugs/smartquotes-on-newline.png new file mode 100644 index 00000000..fdf4623a Binary files /dev/null and b/tests/ref/bugs/smartquotes-on-newline.png differ diff --git a/tests/typ/bugs/smartquotes-on-newline.typ b/tests/typ/bugs/smartquotes-on-newline.typ new file mode 100644 index 00000000..3180350e --- /dev/null +++ b/tests/typ/bugs/smartquotes-on-newline.typ @@ -0,0 +1,7 @@ +// Test that smart quotes are inferred correctly across newlines. + +--- +"test"#linebreak()"test" + +"test"\ +"test"