aboutsummaryrefslogtreecommitdiff
path: root/haddock-library/test/Documentation
diff options
context:
space:
mode:
authorXia Li-yao <Lysxia@users.noreply.github.com>2020-12-08 10:42:17 -0500
committerGitHub <noreply@github.com>2020-12-08 16:42:17 +0100
commit1bedd20b94359728c25f64f7643a0ca0fb0f9fa2 (patch)
treee20d28802925407da6984d17ad615297722a0a4a /haddock-library/test/Documentation
parent1e0ad7350290fad4f8c7728c8b879113b669397a (diff)
Allow more characters in anchor following module reference (#1220)
Diffstat (limited to 'haddock-library/test/Documentation')
-rw-r--r--haddock-library/test/Documentation/Haddock/ParserSpec.hs3
1 files changed, 3 insertions, 0 deletions
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"