aboutsummaryrefslogtreecommitdiff
path: root/haddock-library/test/Documentation/Haddock/ParserSpec.hs
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-07-20 00:56:03 -0700
committerAlec Theriault <alec.theriault@gmail.com>2018-11-06 12:03:24 -0800
commitf11b26e952860f576b3321b35e572ebb339268de (patch)
treea15c7d1c766b981480ffc18896dbd4825163c2b5 /haddock-library/test/Documentation/Haddock/ParserSpec.hs
parent7c77914a3d47b78e690c820b0964a8f14b886cc9 (diff)
Fix/add to haddock-library test suite
Diffstat (limited to 'haddock-library/test/Documentation/Haddock/ParserSpec.hs')
-rw-r--r--haddock-library/test/Documentation/Haddock/ParserSpec.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/haddock-library/test/Documentation/Haddock/ParserSpec.hs b/haddock-library/test/Documentation/Haddock/ParserSpec.hs
index 0449c917..6269184a 100644
--- a/haddock-library/test/Documentation/Haddock/ParserSpec.hs
+++ b/haddock-library/test/Documentation/Haddock/ParserSpec.hs
@@ -37,7 +37,7 @@ parseParas = overDoc Parse.toRegular . Parse.parseParas Nothing
parseString :: String -> Doc String
parseString = Parse.toRegular . Parse.parseString
-hyperlink :: String -> Maybe String -> Doc String
+hyperlink :: String -> Maybe (Doc String) -> Doc String
hyperlink url = DocHyperlink . Hyperlink url
main :: IO ()
@@ -202,6 +202,10 @@ spec = do
"[some label]( url)" `shouldParseTo`
"[some label]( url)"
+ it "allows inline markup in the label" $ do
+ "[something /emphasized/](url)" `shouldParseTo`
+ hyperlink "url" (Just ("something " <> DocEmphasis "emphasized"))
+
context "when URL is on a separate line" $ do
it "allows URL to be on a separate line" $ do
"[some label]\n(url)" `shouldParseTo`