diff options
| -rw-r--r-- | library/src/layout/par.rs | 5 | ||||
| -rw-r--r-- | tests/ref/bugs/smartquotes-in-outline.png | bin | 0 -> 8184 bytes | |||
| -rw-r--r-- | tests/typ/bugs/smartquotes-in-outline.typ | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/library/src/layout/par.rs b/library/src/layout/par.rs index 7a1a21e7..a6ad647b 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::<TextElem>() { elem.text().chars().next() } else if child.is::<SmartQuoteElem>() { diff --git a/tests/ref/bugs/smartquotes-in-outline.png b/tests/ref/bugs/smartquotes-in-outline.png Binary files differnew file mode 100644 index 00000000..c8d763b4 --- /dev/null +++ b/tests/ref/bugs/smartquotes-in-outline.png diff --git a/tests/typ/bugs/smartquotes-in-outline.typ b/tests/typ/bugs/smartquotes-in-outline.typ new file mode 100644 index 00000000..1ecfcdc4 --- /dev/null +++ b/tests/typ/bugs/smartquotes-in-outline.typ @@ -0,0 +1,4 @@ +#set page(width: 15em) +#outline() + += "This" "is" "a" "test" |
