git.iko.soy/typeable/pandoc
on master help sign in
DokuWiki writer: Fix raw inlines and blocks.

* mediawiki > dokuwiki * ignore raw content other than html or dokuwiki. (#1398)

commitce0960ba5af2a32c9f8a44642fd16e14d721202b authorJohn MacFarlane <jgm@berkeley.edu> dateSun 13 Jul 2014, 15:24 (12 years ago) parent92bcd8d
1 file changed+6−6
src/Text/Pandoc/Writers/DokuWiki.hs+6−6
src/Text/Pandoc/Writers/DokuWiki.hs+6−6
@@ -119,9 +119,9 @@ blockToDokuWiki opts (Para inlines) = do
119119 else contents ++ if null indent then "\n" else ""
120120
121121blockToDokuWiki _ (RawBlock f str)
122− | f == Format "mediawiki" = return str
123− | f == Format "html" = return $ "<html>\n" ++ str ++ "</html>"
124− | otherwise = return str
122+ | f == Format "dokuwiki" = return str
123+ | f == Format "html" = return $ "<html>\n" ++ str ++ "</html>"
124+ | otherwise = return ""
125125
126126blockToDokuWiki _ HorizontalRule = return "\n----\n"
127127
@@ -403,9 +403,9 @@ inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>"
403403 -- note: str should NOT be escaped
404404
405405inlineToDokuWiki _ (RawInline f str)
406− | f == Format "mediawiki" = return str
407− | f == Format "html" = return str
408− | otherwise = return str
406+ | f == Format "dokuwiki" = return str
407+ | f == Format "html" = return str
408+ | otherwise = return ""
409409
410410inlineToDokuWiki _ (LineBreak) = return "\\\\ "
411411