diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-06-07 11:29:47 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-06-07 11:29:47 -0700 |
commit | 7b4f077652c774d8c366c9ac2aa3e6ca7ad708f2 (patch) | |
tree | 6e45b727f1a7c17af8c74fabf04969337618942a /src/Text | |
parent | cb7dd4469d420aea1a296079b7002aa5452fb481 (diff) | |
download | pandoc-7b4f077652c774d8c366c9ac2aa3e6ca7ad708f2.tar.gz |
DokuWiki writer: Use proper `<code>` tags for code blocks.
Closes #2213.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/DokuWiki.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index 94f3a02cc..7164c6e86 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -172,10 +172,10 @@ blockToDokuWiki _ (CodeBlock (_,classes,_) str) = do "python", "qbasic", "rails", "reg", "robots", "ruby", "sas", "scheme", "sdlbasic", "smalltalk", "smarty", "sql", "tcl", "", "thinbasic", "tsql", "vb", "vbnet", "vhdl", "visualfoxpro", "winbatch", "xml", "xpp", "z80"] - let (beg, end) = if null at - then ("<code" ++ if null classes then ">" else " class=\"" ++ unwords classes ++ "\">", "</code>") - else ("<source lang=\"" ++ head at ++ "\">", "</source>") - return $ beg ++ str ++ end + return $ "<code" ++ + (case at of + [] -> ">\n" + (x:_) -> " " ++ x ++ ">\n") ++ str ++ "\n</code>" blockToDokuWiki opts (BlockQuote blocks) = do contents <- blockListToDokuWiki opts blocks |