From 22969c1b9cc88225c8bc60ac4e98636051ca7b4c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 29 Jan 2011 16:11:16 -0800 Subject: HTML writer: avoid doubled tag for highlighted inline code. --- src/Text/Pandoc/Writers/HTML.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/Text/Pandoc') 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 >>= -- cgit v1.2.3