diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-02-09 03:18:47 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2008-02-09 03:18:47 +0000 |
commit | 769e2f3cf591c4f03fc6991482a406275ea57085 (patch) | |
tree | 28bc398d5f9fb5362f95660dfb037e51f6b23a23 /Text/Pandoc/Writers | |
parent | fa0ab8617a1b80ddf4a96017365925cc598cda27 (diff) | |
download | pandoc-769e2f3cf591c4f03fc6991482a406275ea57085.tar.gz |
HTML writer: if language specified for code block, print as <code> class.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1202 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc/Writers')
-rw-r--r-- | Text/Pandoc/Writers/HTML.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Text/Pandoc/Writers/HTML.hs b/Text/Pandoc/Writers/HTML.hs index ec01951f7..c31688ca6 100644 --- a/Text/Pandoc/Writers/HTML.hs +++ b/Text/Pandoc/Writers/HTML.hs @@ -263,7 +263,8 @@ blockToHtml opts (Plain lst) = inlineListToHtml opts lst blockToHtml opts (Para lst) = inlineListToHtml opts lst >>= (return . paragraph) blockToHtml opts (RawHtml str) = return $ primHtml str blockToHtml opts (HorizontalRule) = return $ hr -blockToHtml opts (CodeBlock _ str) = return $ pre $ thecode << (str ++ "\n") +blockToHtml opts (CodeBlock lang str) = return $ pre $ + thecode ! (if null lang then [] else [theclass lang]) << (str ++ "\n") -- the final \n for consistency with Markdown.pl blockToHtml opts (BlockQuote blocks) = -- in S5, treat list in blockquote specially |