From 9f28acba9dc43a63172e771b57f8a51b6b738d71 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 29 Jan 2011 16:04:07 -0800 Subject: Fixed highlighting for inline code. highlightHtml in Highlighting now has a boolean argument that selects between inline and block content. Revised tests for new highlighting-kate. --- src/Text/Pandoc/Writers/HTML.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 3b40515da..08860e0f1 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -324,7 +324,7 @@ blockToHtml opts (CodeBlock (id',classes,keyvals) rawCode) = do let classes' = if writerLiterateHaskell opts then classes else filter (/= "literate") classes - case highlightHtml (id',classes',keyvals) rawCode of + case highlightHtml False (id',classes',keyvals) rawCode of Left _ -> -- change leading newlines into
tags, because some -- browsers ignore leading newlines in pre blocks let (leadingBreaks, rawCode') = span (=='\n') rawCode @@ -484,7 +484,7 @@ inlineToHtml opts inline = (Emph lst) -> inlineListToHtml opts lst >>= return . emphasize (Strong lst) -> inlineListToHtml opts lst >>= return . strong (Code attr str) -> return $ thecode ! (attrsToHtml opts attr) << str' - where str' = case highlightHtml attr str of + where str' = case highlightHtml True attr str of Left _ -> stringToHtml str Right h -> h (Strikeout lst) -> inlineListToHtml opts lst >>= -- cgit v1.2.3