aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-01-10 10:27:31 -0800
committerJohn MacFarlane <[email protected]>2022-01-10 10:29:25 -0800
commit6f739cdb4d754e04a006aa796c45342e92a424bb (patch)
tree98cb8583fb363b04feca3b71ac8005a5cb345910 /src
parentdd706bc49c56fdd76570bbb5f4b95972e264f39f (diff)
Fix regression: allow blank lines in HTML attributes.
The commit 7a9832166e36f77402d5e0259647e9f5c7ba4e58 had the effect that blank lines would be collapsed in HTML attributes. We also roll back a change that collapsed multiple spaces into one.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Blaze.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Blaze.hs b/src/Text/Pandoc/Writers/Blaze.hs
index 4bd21b789..8233043a3 100644
--- a/src/Text/Pandoc/Writers/Blaze.hs
+++ b/src/Text/Pandoc/Writers/Blaze.hs
@@ -113,8 +113,8 @@ toChunks :: Text -> [Doc Text]
toChunks = map toDoc . T.groupBy sameStatus
where
toDoc t
- | T.any (== ' ') t = space
- | T.any (== '\n') t = cr
+ | t == " " = space
+ | t == "\n" = cr
| otherwise = literal t
sameStatus c d =
(c == ' ' && d == ' ') ||