diff options
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/MediaWiki.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/MediaWiki.hs b/src/Text/Pandoc/Writers/MediaWiki.hs index 07fddcfb4..f81fda5d4 100644 --- a/src/Text/Pandoc/Writers/MediaWiki.hs +++ b/src/Text/Pandoc/Writers/MediaWiki.hs @@ -80,6 +80,14 @@ blockToMediaWiki _ Null = return "" blockToMediaWiki opts (Plain inlines) = inlineListToMediaWiki opts inlines +blockToMediaWiki opts (Para [Image txt (src,tit)]) = do + capt <- inlineListToMediaWiki opts txt + let opt = if null txt + then "" + else "|alt=" ++ if null tit then capt else tit ++ + "|caption " ++ capt + return $ "[[Image:" ++ src ++ "|frame|none" ++ opt ++ "]]\n" + blockToMediaWiki opts (Para inlines) = do useTags <- get >>= return . stUseTags listLevel <- get >>= return . stListLevel |