Skip to content

Commit

Permalink
Disallow empty autolinks
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkkrp committed Jan 27, 2018
1 parent 41441f1 commit 692720c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Text/MMark/Parser.hs
Expand Up @@ -663,6 +663,7 @@ pImage = do

pAutolink :: IParser Inline
pAutolink = between (char '<') (char '>') $ do
notFollowedBy (char '>')
uri' <- URI.parser
let (txt, uri) =
case isEmailUri uri' of
Expand Down
2 changes: 1 addition & 1 deletion tests/Text/MMarkSpec.hs
Expand Up @@ -1677,7 +1677,7 @@ spec = parallel $ do
"<p>&lt;foo+@bar.example.com&gt;</p>\n"
it "CM578" $
"<>" ==->
"<p><a href></a></p>\n"
"<p>&lt;&gt;</p>\n"
it "CM579" $
"< http://foo.bar >" ==->
"<p>&lt; http://foo.bar &gt;</p>\n"
Expand Down

0 comments on commit 692720c

Please sign in to comment.