aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Parsing.hs2
-rw-r--r--tests/mediawiki-reader.native3
-rw-r--r--tests/mediawiki-reader.wiki1
3 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs
index 44a64c80a..31f3d2525 100644
--- a/src/Text/Pandoc/Parsing.hs
+++ b/src/Text/Pandoc/Parsing.hs
@@ -430,7 +430,7 @@ uri = try $ do
let percentEscaped = try $ char '%' >> skipMany1 (satisfy isHexDigit)
let entity = () <$ characterReference
let punct = skipMany1 (char ',')
- <|> () <$ (satisfy (not . isSpace))
+ <|> () <$ (satisfy (\c -> not (isSpace c) && c /= '<'))
let uriChunk = skipMany1 wordChar
<|> percentEscaped
<|> entity
diff --git a/tests/mediawiki-reader.native b/tests/mediawiki-reader.native
index 2527c7851..3de4df068 100644
--- a/tests/mediawiki-reader.native
+++ b/tests/mediawiki-reader.native
@@ -242,4 +242,5 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []})
[[[Para [Str "Orange"]]]]
,Para [Str "Paragraph",Space,Str "after",Space,Str "the",Space,Str "table."]
,Header 2 ("",[],[]) [Str "notes"]
-,Para [Str "My",Space,Str "note!",Note [Plain [Str "This."]]]]
+,Para [Str "My",Space,Str "note!",Note [Plain [Str "This."]]]
+,Para [Str "URL",Space,Str "note.",Note [Plain [Link [Str "http://docs.python.org/library/functions.html#range"] ("http://docs.python.org/library/functions.html#range","")]]]]
diff --git a/tests/mediawiki-reader.wiki b/tests/mediawiki-reader.wiki
index e373c332e..128e74a14 100644
--- a/tests/mediawiki-reader.wiki
+++ b/tests/mediawiki-reader.wiki
@@ -370,3 +370,4 @@ and cheese
My note!<ref>This.</ref>
+URL note.<ref>http://docs.python.org/library/functions.html#range</ref>