mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 19:26:45 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user