git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #1927 from freephile/master

update syntax for Images/Media files in MediaWiki

commit12962e2332ab667b2a7b59b5b05defa14437381b authorJohn MacFarlane <jgm@berkeley.edu> dateSat 7 Feb 2015, 20:33 (12 years ago) parent24f379e218f28a
2 files changed+4−4
src/Text/Pandoc/Writers/MediaWiki.hs+2−2 tests/writer.mediawiki+2−2
src/Text/Pandoc/Writers/MediaWiki.hs+2−2
@@ -107,7 +107,7 @@ blockToMediaWiki (Para [Image txt (src,'f':'i':'g':':':tit)]) = do
107107 let opt = if null txt
108108 then ""
109109 else "|alt=" ++ if null tit then capt else tit ++ capt
110− return $ "[[Image:" ++ src ++ "|frame|none" ++ opt ++ "]]\n"
110+ return $ "[[File:" ++ src ++ "|frame|none" ++ opt ++ "]]\n"
111111
112112blockToMediaWiki (Para inlines) = do
113113 tags <- asks useTags
@@ -397,7 +397,7 @@ inlineToMediaWiki (Image alt (source, tit)) = do
397397 then ""
398398 else '|' : alt'
399399 else '|' : tit
400− return $ "[[Image:" ++ source ++ txt ++ "]]"
400+ return $ "[[File:" ++ source ++ txt ++ "]]"
401401
402402inlineToMediaWiki (Note contents) = do
403403 contents' <- blockListToMediaWiki contents
tests/writer.mediawiki+2−2
@@ -624,9 +624,9 @@ Auto-links should not occur here: <code>&lt;http://example.com/&gt;</code>
624624
625625From “Voyage dans la Lune” by Georges Melies (1902):
626626
627−[[Image:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]]
627+[[File:lalune.jpg|frame|none|alt=Voyage dans la Lune|caption lalune]]
628628
629−Here is a movie [[Image:movie.jpg|movie]] icon.
629+Here is a movie [[File:movie.jpg|movie]] icon.
630630
631631
632632-----