From 6f739cdb4d754e04a006aa796c45342e92a424bb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 10 Jan 2022 10:27:31 -0800 Subject: 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. --- src/Text/Pandoc/Writers/Blaze.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text') 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 == ' ') || -- cgit v1.2.3