summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-02-07 20:33:33 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-02-07 20:33:33 -0800
commit12962e2332ab667b2a7b59b5b05defa14437381b (patch)
treee9c2354af0b1795f2279eb439c460c021eb2618f
parent24f379ebd75373d812045f3994d4626ad106fd27 (diff)
parent218f28af6d1d598386639725196d5d1d4c349738 (diff)
Merge pull request #1927 from freephile/master
update syntax for Images/Media files in MediaWiki
-rw-r--r--src/Text/Pandoc/Writers/MediaWiki.hs4
-rw-r--r--tests/writer.mediawiki4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/MediaWiki.hs b/src/Text/Pandoc/Writers/MediaWiki.hs
index ccb39e295..b49c60867 100644
--- a/src/Text/Pandoc/Writers/MediaWiki.hs
+++ b/src/Text/Pandoc/Writers/MediaWiki.hs
@@ -107,7 +107,7 @@ blockToMediaWiki (Para [Image txt (src,'f':'i':'g':':':tit)]) = do
let opt = if null txt
then ""
else "|alt=" ++ if null tit then capt else tit ++ capt
- return $ "[[Image:" ++ src ++ "|frame|none" ++ opt ++ "]]\n"
+ return $ "[[File:" ++ src ++ "|frame|none" ++ opt ++ "]]\n"
blockToMediaWiki (Para inlines) = do
tags <- asks useTags
@@ -397,7 +397,7 @@ inlineToMediaWiki (Image alt (source, tit)) = do
then ""
else '|' : alt'
else '|' : tit
- return $ "[[Image:" ++ source ++ txt ++ "]]"
+ return $ "[[File:" ++ source ++ txt ++ "]]"
inlineToMediaWiki (Note contents) = do
contents' <- blockListToMediaWiki contents
diff --git a/tests/writer.mediawiki b/tests/writer.mediawiki
index b8b99c5e7..066606c00 100644
--- a/tests/writer.mediawiki
+++ b/tests/writer.mediawiki
@@ -624,9 +624,9 @@ Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code>
From “Voyage dans la Lune” by Georges Melies (1902):
-[[Image:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]]
+[[File:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]]
-Here is a movie [[Image:movie.jpg|movie]] icon.
+Here is a movie [[File:movie.jpg|movie]] icon.
-----