summaryrefslogtreecommitdiff
path: root/library/src/layout
diff options
context:
space:
mode:
authorchris-02 <103339277+chris-02@users.noreply.github.com>2023-05-01 13:29:40 +0200
committerGitHub <noreply@github.com>2023-05-01 13:29:40 +0200
commit407d8a3ab291c953d9dec826015099dd0d18749e (patch)
tree96e6370266c0fdd874c4353c8356613a091aa950 /library/src/layout
parent4c4bee98453520cf2259c823fd42a0f810b2a87e (diff)
Fix smartquotes in outline (#1047)
Fixes #1041.
Diffstat (limited to 'library/src/layout')
-rw-r--r--library/src/layout/par.rs5
1 files changed, 5 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>() {