MediaWiki writer: Fixed links with URL = text.
Previously these were rendered as bare words, even if the URL
was not an absolute URL.
Closes #1825.
commit005eda2f02d74ffd85cb35370811fda0faadc2d0
authorJohn MacFarlane <jgm@berkeley.edu>
dateFri 19 Dec 2014, 11:32 (12 years ago)
parent2f7ee66
src/Text/Pandoc/Writers/MediaWiki.hs+1−1
@@ -382,7 +382,7 @@ inlineToMediaWiki Space = return " "
382382inlineToMediaWiki (Link txt (src, _)) = do
383383 label <- inlineListToMediaWiki txt
384384 case txt of
385− [Str s] | escapeURI s == src -> return src
385+ [Str s] | isURI src && escapeURI s == src -> return src
386386 _ -> return $ if isURI src
387387 then "[" ++ src ++ " " ++ label ++ "]"
388388 else "[[" ++ src' ++ "|" ++ label ++ "]]"