diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-29 16:11:16 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-29 16:11:16 -0800 |
commit | 22969c1b9cc88225c8bc60ac4e98636051ca7b4c (patch) | |
tree | 68811703dddb0c5b31800818335feeb5c2229f20 /src/Text | |
parent | 9f28acba9dc43a63172e771b57f8a51b6b738d71 (diff) | |
download | pandoc-22969c1b9cc88225c8bc60ac4e98636051ca7b4c.tar.gz |
HTML writer: avoid doubled <code> tag for highlighted inline code.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 08860e0f1..ef14b6809 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -483,10 +483,11 @@ inlineToHtml opts inline = (Apostrophe) -> return $ stringToHtml "’" (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 True attr str of - Left _ -> stringToHtml str - Right h -> h + (Code attr str) -> case highlightHtml True attr str of + Left _ -> return + $ thecode ! (attrsToHtml opts attr) + $ stringToHtml str + Right h -> return h (Strikeout lst) -> inlineListToHtml opts lst >>= return . (thespan ! [thestyle "text-decoration: line-through;"]) (SmallCaps lst) -> inlineListToHtml opts lst >>= |