layout::par::collect: Treat linebreak element as whitespace (#1542)
Fixes #1540.
This commit is contained in:
parent
e1d76960eb
commit
622cef8e00
|
|
@ -609,7 +609,10 @@ fn collect<'a>(
|
||||||
elem.text().chars().next()
|
elem.text().chars().next()
|
||||||
} else if child.is::<SmartQuoteElem>() {
|
} else if child.is::<SmartQuoteElem>() {
|
||||||
Some('"')
|
Some('"')
|
||||||
} else if child.is::<SpaceElem>() || child.is::<HElem>() {
|
} else if child.is::<SpaceElem>()
|
||||||
|
|| child.is::<HElem>()
|
||||||
|
|| child.is::<LinebreakElem>()
|
||||||
|
{
|
||||||
Some(SPACING_REPLACE)
|
Some(SPACING_REPLACE)
|
||||||
} else {
|
} else {
|
||||||
Some(OBJ_REPLACE)
|
Some(OBJ_REPLACE)
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -0,0 +1,7 @@
|
||||||
|
// Test that smart quotes are inferred correctly across newlines.
|
||||||
|
|
||||||
|
---
|
||||||
|
"test"#linebreak()"test"
|
||||||
|
|
||||||
|
"test"\
|
||||||
|
"test"
|
||||||
Loading…
Reference in New Issue