summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-09-06 18:05:08 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-09-06 18:05:08 +0000
commitee2dee238d22cd08d60c3dcc3a9ee677b0f02067 (patch)
tree465c8e84298b2dcec2d24ae3b5fafcd4b25cfd19
parent2127b7d5135af88dc3f2e7d78136ce24547bca3b (diff)
MediaWiki writer: print class attributes in <pre> for code blocks, if any.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1419 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--Text/Pandoc/Writers/MediaWiki.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Text/Pandoc/Writers/MediaWiki.hs b/Text/Pandoc/Writers/MediaWiki.hs
index 050781d37..d25cfaed0 100644
--- a/Text/Pandoc/Writers/MediaWiki.hs
+++ b/Text/Pandoc/Writers/MediaWiki.hs
@@ -109,7 +109,7 @@ blockToMediaWiki _ (CodeBlock (_,classes,_) str) = do
"smalltalk", "smarty", "sql", "tcl", "", "thinbasic", "tsql", "vb", "vbnet", "vhdl",
"visualfoxpro", "winbatch", "xml", "xpp", "z80"]
let (beg, end) = if null at
- then ("<pre>", "</pre>")
+ then ("<pre" ++ if null classes then ">" else " class=\"" ++ unwords classes ++ "\">", "</pre>")
else ("<source lang=\"" ++ head at ++ "\">", "</source>")
return $ beg ++ escapeString str ++ end