diff options
author | Timm Albers <timm.albers@open-xchange.com> | 2017-04-03 14:29:32 +0200 |
---|---|---|
committer | Timm Albers <timm.albers@open-xchange.com> | 2017-04-03 14:36:36 +0200 |
commit | 6e2019d58812df59d1cb74723c71305c9b233bae (patch) | |
tree | f433c66a6b156e9d041e0f2ec52abff916755649 /src/Text/Pandoc | |
parent | e3e52aa4c17aee452658e9252210d3621255964c (diff) | |
download | pandoc-6e2019d58812df59d1cb74723c71305c9b233bae.tar.gz |
Include \VerbatimFootnotes for highlighted code blocks
Updated the LaTeX writer to also include \VerbatimFootnotes in the
preamble for highlighted code blocks. Previously this was only done for
raw code blocks.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index eb38485de..70539a4a6 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -554,8 +554,11 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do unless (null msg) $ report $ CouldNotHighlight msg rawCodeBlock - Right h -> modify (\st -> st{ stHighlighting = True }) >> - return (flush $ linkAnchor $$ text (T.unpack h)) + Right h -> do + st <- get + when (stInNote st) $ modify (\s -> s{ stVerbInNote = True }) + modify (\s -> s{ stHighlighting = True }) + return (flush $ linkAnchor $$ text (T.unpack h)) case () of _ | isEnabled Ext_literate_haskell opts && "haskell" `elem` classes && "literate" `elem` classes -> lhsCodeBlock |