diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-07-13 15:28:47 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-07-13 15:28:47 -0700 |
commit | 798c57d9b2c75d2dde3d343e3a49c93664730630 (patch) | |
tree | fc68fecb89008f6d0e432b2fbe013ac93b959686 /src | |
parent | ce0960ba5af2a32c9f8a44642fd16e14d721202b (diff) | |
download | pandoc-798c57d9b2c75d2dde3d343e3a49c93664730630.tar.gz |
DokuWiki writer: More raw HTML fixes. (#1398)
* Use uppercase HTML tags for block-level content, lowercase for
inline.
* Newline before closing HTML tag.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/DokuWiki.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index 3511c4862..47c583f05 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -120,7 +120,9 @@ blockToDokuWiki opts (Para inlines) = do blockToDokuWiki _ (RawBlock f str) | f == Format "dokuwiki" = return str - | f == Format "html" = return $ "<html>\n" ++ str ++ "</html>" + -- See https://www.dokuwiki.org/wiki:syntax + -- use uppercase HTML tag for block-level content: + | f == Format "html" = return $ "<HTML>\n" ++ str ++ "\n</HTML>" | otherwise = return "" blockToDokuWiki _ HorizontalRule = return "\n----\n" @@ -404,7 +406,7 @@ inlineToDokuWiki _ (Math _ str) = return $ "<math>" ++ str ++ "</math>" inlineToDokuWiki _ (RawInline f str) | f == Format "dokuwiki" = return str - | f == Format "html" = return str + | f == Format "html" = return $ "<html>" ++ str ++ "</html>" | otherwise = return "" inlineToDokuWiki _ (LineBreak) = return "\\\\ " |