diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs index 7a1a21e75..a6ad647bd 100644 --- a/library/src/layout/par.rs +++ b/library/src/layout/par.rs @@ -568,6 +568,11 @@ fn collect<'a>( let region = TextElem::region_in(styles); let quotes = Quotes::from_lang(lang, region); let peeked = iter.peek().and_then(|child| { + let child = if let Some((child, _)) = child.to_styled() { + child + } else { + child + }; if let Some(elem) = child.to::() { elem.text().chars().next() } else if child.is::() { diff --git a/tests/ref/bugs/smartquotes-in-outline.png b/tests/ref/bugs/smartquotes-in-outline.png new file mode 100644 index 000000000..c8d763b4f Binary files /dev/null and b/tests/ref/bugs/smartquotes-in-outline.png differ diff --git a/tests/typ/bugs/smartquotes-in-outline.typ b/tests/typ/bugs/smartquotes-in-outline.typ new file mode 100644 index 000000000..1ecfcdc40 --- /dev/null +++ b/tests/typ/bugs/smartquotes-in-outline.typ @@ -0,0 +1,4 @@ +#set page(width: 15em) +#outline() + += "This" "is" "a" "test"