Fix regression: allow blank lines in HTML attributes.

The commit 7a9832166e
had the effect that blank lines would be collapsed
in HTML attributes.

We also roll back a change that collapsed multiple
spaces into one.
This commit is contained in:
John MacFarlane 2022-01-10 10:27:31 -08:00
parent dd706bc49c
commit 6f739cdb4d
2 changed files with 3 additions and 3 deletions

View file

@ -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 == ' ') ||