diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2011-12-28 22:04:38 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2011-12-28 22:04:38 -0800 |
commit | 012405e8c3df0ce400b05f524d14de88cf5d5115 (patch) | |
tree | 41daad63aa1c6ac57aa1c938745eabd4ab024d08 /src/Text/Pandoc/Highlighting.hs | |
parent | 4fd9fb9ea24b5a30e0cfa50ec5317186af114df8 (diff) |
Preserve attributes in highlighted HTML.
The container element will have the classes, id, and
key-value attributes you specified in the delimited code
block.
Previously these were stripped off.
Diffstat (limited to 'src/Text/Pandoc/Highlighting.hs')
-rw-r--r-- | src/Text/Pandoc/Highlighting.hs | 3 |
1 files changed, 2 insertions, 1 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 |