mirror of
https://github.com/typst/typst
synced 2025-05-21 04:25:28 +08:00
parent
4c4bee9845
commit
407d8a3ab2
@ -568,6 +568,11 @@ fn collect<'a>(
|
|||||||
let region = TextElem::region_in(styles);
|
let region = TextElem::region_in(styles);
|
||||||
let quotes = Quotes::from_lang(lang, region);
|
let quotes = Quotes::from_lang(lang, region);
|
||||||
let peeked = iter.peek().and_then(|child| {
|
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>() {
|
if let Some(elem) = child.to::<TextElem>() {
|
||||||
elem.text().chars().next()
|
elem.text().chars().next()
|
||||||
} else if child.is::<SmartQuoteElem>() {
|
} else if child.is::<SmartQuoteElem>() {
|
||||||
|
BIN
tests/ref/bugs/smartquotes-in-outline.png
Normal file
BIN
tests/ref/bugs/smartquotes-in-outline.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
4
tests/typ/bugs/smartquotes-in-outline.typ
Normal file
4
tests/typ/bugs/smartquotes-in-outline.typ
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#set page(width: 15em)
|
||||||
|
#outline()
|
||||||
|
|
||||||
|
= "This" "is" "a" "test"
|
Loading…
x
Reference in New Issue
Block a user