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
This commit is contained in:
fiddlosopher 2008-02-09 03:18:47 +00:00
parent fa0ab8617a
commit 769e2f3cf5

View file

@ -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