Merge pull request #1927 from freephile/master

update syntax for Images/Media files in MediaWiki
This commit is contained in:
John MacFarlane 2015-02-07 20:33:33 -08:00
commit 12962e2332
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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.
-----