diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-29 16:04:07 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-29 16:04:07 -0800 |
commit | 9f28acba9dc43a63172e771b57f8a51b6b738d71 (patch) | |
tree | e1854e3a5d312fa48949f26e465d12043fb36387 /src/Text/Pandoc/Writers | |
parent | 9e89047518c9fc4278454574d4c0e86fffe75675 (diff) | |
download | pandoc-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.hs | 4 |
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 >>= |