aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-19 11:32:37 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-19 11:32:37 -0800
commit005eda2f02d74ffd85cb35370811fda0faadc2d0 (patch)
tree737173e8002747cea3f277835e33e7fbce61a01f /src/Text/Pandoc
parent2f7ee662fb81e31fe6df84de51a73da216eb6444 (diff)
downloadpandoc-005eda2f02d74ffd85cb35370811fda0faadc2d0.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/MediaWiki.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/MediaWiki.hs b/src/Text/Pandoc/Writers/MediaWiki.hs
index 3f392a5d0..4f03ee3bb 100644
--- a/src/Text/Pandoc/Writers/MediaWiki.hs
+++ b/src/Text/Pandoc/Writers/MediaWiki.hs
@@ -382,7 +382,7 @@ inlineToMediaWiki Space = return " "
inlineToMediaWiki (Link txt (src, _)) = do
label <- inlineListToMediaWiki txt
case txt of
- [Str s] | escapeURI s == src -> return src
+ [Str s] | isURI src && escapeURI s == src -> return src
_ -> return $ if isURI src
then "[" ++ src ++ " " ++ label ++ "]"
else "[[" ++ src' ++ "|" ++ label ++ "]]"