aboutsummaryrefslogtreecommitdiff
path: root/haddock-test
diff options
context:
space:
mode:
authorwz1000 <zubin.duggal@gmail.com>2021-10-11 15:40:19 +0530
committerGitHub <noreply@github.com>2021-10-11 12:10:19 +0200
commita33e376531a4f478bacd41fc3028985405b8c164 (patch)
treedde32ed6fcf5728c77ac72ceb6ca90962e654c82 /haddock-test
parent1b63771dee5a7fac0696505d0b335908bd12835d (diff)
Enable Haddock tests in GHC windows CI (#1428)
* testsuite: strip windows line endings for haddock * hyperlinker: Work around double escaping (#19236) * deterministic SCC
Diffstat (limited to 'haddock-test')
-rw-r--r--haddock-test/src/Test/Haddock/Xhtml.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/haddock-test/src/Test/Haddock/Xhtml.hs b/haddock-test/src/Test/Haddock/Xhtml.hs
index bca2c4cc..74d8c4f7 100644
--- a/haddock-test/src/Test/Haddock/Xhtml.hs
+++ b/haddock-test/src/Test/Haddock/Xhtml.hs
@@ -23,8 +23,9 @@ import Data.Char ( isSpace )
newtype Xml = Xml { unXml :: String }
-- | Part of parsing involves dropping the @DOCTYPE@ line
+-- and windows newline endings
parseXml :: String -> Maybe Xml
-parseXml = Just . Xml . dropDocTypeLine
+parseXml = Just . Xml . filter (/= '\r') . dropDocTypeLine
where
dropDocTypeLine bs
| "<!DOCTYPE" `isPrefixOf` bs