diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-07-13 15:24:52 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-07-13 15:25:25 -0700 |
commit | ce0960ba5af2a32c9f8a44642fd16e14d721202b (patch) | |
tree | 1979c386c1e76ca0f209b7ba6caef536d9de81a2 /src/Text/Pandoc | |
parent | 92bcd8d298a0c66e1a984e3184765e503a0bbc4d (diff) | |
download | pandoc-ce0960ba5af2a32c9f8a44642fd16e14d721202b.tar.gz |
DokuWiki writer: Fix raw inlines and blocks.
* mediawiki > dokuwiki
* ignore raw content other than html or dokuwiki.
(#1398)
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/DokuWiki.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index f04dab76d..3511c4862 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -119,9 +119,9 @@ blockToDokuWiki opts (Para inlines) = do else contents ++ if null indent then "\n" else "" blockToDokuWiki _ (RawBlock f str) - | f == Format "mediawiki" = return str - | f == Format "html" = return $ "<html>\n" ++ str ++ "</html>" - | otherwise = return str + | f == Format "dokuwiki" = return str + | f == Format "html" = return $ "<html>\n" ++ str ++ "</html>" + | otherwise = return "" blockToDokuWiki _ HorizontalRule = return "\n----\n" @@ -403,9 +403,9 @@ inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>" -- note: str should NOT be escaped inlineToDokuWiki _ (RawInline f str) - | f == Format "mediawiki" = return str - | f == Format "html" = return str - | otherwise = return str + | f == Format "dokuwiki" = return str + | f == Format "html" = return str + | otherwise = return "" inlineToDokuWiki _ (LineBreak) = return "\\\\ " |