summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-04-03 16:15:27 +0200
committerGitHub <noreply@github.com>2017-04-03 16:15:27 +0200
commit13cee8c32fb941383e62ab1309904736e25c1b06 (patch)
treef433c66a6b156e9d041e0f2ec52abff916755649
parente3e52aa4c17aee452658e9252210d3621255964c (diff)
parent6e2019d58812df59d1cb74723c71305c9b233bae (diff)
Merge pull request #3553 from nunull/master
Include \VerbatimFootnotes for highlighted code blocks
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs7
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