aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-29 16:04:07 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-29 16:04:07 -0800
commit9f28acba9dc43a63172e771b57f8a51b6b738d71 (patch)
treee1854e3a5d312fa48949f26e465d12043fb36387 /src/Text/Pandoc/Writers
parent9e89047518c9fc4278454574d4c0e86fffe75675 (diff)
downloadpandoc-9f28acba9dc43a63172e771b57f8a51b6b738d71.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs4
1 files changed, 2 insertions, 2 deletions
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 <br /> 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 >>=