From 1bedd20b94359728c25f64f7643a0ca0fb0f9fa2 Mon Sep 17 00:00:00 2001 From: Xia Li-yao Date: Tue, 8 Dec 2020 10:42:17 -0500 Subject: Allow more characters in anchor following module reference (#1220) --- haddock-library/test/Documentation/Haddock/ParserSpec.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'haddock-library/test/Documentation') diff --git a/haddock-library/test/Documentation/Haddock/ParserSpec.hs b/haddock-library/test/Documentation/Haddock/ParserSpec.hs index 8b59b560..9bf9b6ea 100644 --- a/haddock-library/test/Documentation/Haddock/ParserSpec.hs +++ b/haddock-library/test/Documentation/Haddock/ParserSpec.hs @@ -431,6 +431,9 @@ spec = do it "accepts anchor reference syntax as DocModule" $ do "\"Foo#bar\"" `shouldParseTo` DocModule "Foo#bar" + it "accepts anchor with hyphen as DocModule" $ do + "\"Foo#bar-baz\"" `shouldParseTo` DocModule "Foo\\#bar-baz" + it "accepts old anchor reference syntax as DocModule" $ do "\"Foo\\#bar\"" `shouldParseTo` DocModule "Foo\\#bar" -- cgit v1.2.3