aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Highlighting.hs3
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Highlighting.hs b/src/Text/Pandoc/Highlighting.hs
index 276d98529..a40bab66a 100644
--- a/src/Text/Pandoc/Highlighting.hs
+++ b/src/Text/Pandoc/Highlighting.hs
@@ -70,6 +70,7 @@ highlight formatter (_, classes, keyvals) rawCode =
in case find (`elem` lcLanguages) lcclasses of
Nothing -> Nothing
Just language -> Just
- $ formatter fmtOpts{ codeClasses = [language] }
+ $ formatter fmtOpts{ codeClasses = [language],
+ containerClasses = classes }
$ highlightAs language rawCode
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 3b926cf06..5b885dbfb 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -379,7 +379,7 @@ blockToHtml opts (CodeBlock (id',classes,keyvals) rawCode) = do
in return $ foldl (!) H.pre attrs $ H.code
$ toHtml adjCode
Just h -> modify (\st -> st{ stHighlighting = True }) >>
- return h
+ return (foldl (!) h (attrsToHtml opts (id',[],keyvals)))
blockToHtml opts (BlockQuote blocks) =
-- in S5, treat list in blockquote specially
-- if default is incremental, make it nonincremental;
@@ -547,7 +547,9 @@ inlineToHtml opts inline =
Nothing -> return
$ foldl (!) H.code (attrsToHtml opts attr)
$ strToHtml str
- Just h -> return h
+ Just h -> return $ foldl (!) h $
+ attrsToHtml opts (id',[],keyvals)
+ where (id',_,keyvals) = attr
(Strikeout lst) -> inlineListToHtml opts lst >>=
return . H.del
(SmallCaps lst) -> inlineListToHtml opts lst >>=