git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #3553 from nunull/master

Include \VerbatimFootnotes for highlighted code blocks

commit13cee8c32fb941383e62ab1309904736e25c1b06 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 3 Apr 2017, 16:15 (10 years ago) parente3e52aa6e2019d
1 file changed+5−2
src/Text/Pandoc/Writers/LaTeX.hs+5−2
src/Text/Pandoc/Writers/LaTeX.hs+5−2
@@ -554,8 +554,11 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
554554 unless (null msg) $
555555 report $ CouldNotHighlight msg
556556 rawCodeBlock
557− Right h -> modify (\st -> st{ stHighlighting = True }) >>
558− return (flush $ linkAnchor $$ text (T.unpack h))
557+ Right h -> do
558+ st <- get
559+ when (stInNote st) $ modify (\s -> s{ stVerbInNote = True })
560+ modify (\s -> s{ stHighlighting = True })
561+ return (flush $ linkAnchor $$ text (T.unpack h))
559562 case () of
560563 _ | isEnabled Ext_literate_haskell opts && "haskell" `elem` classes &&
561564 "literate" `elem` classes -> lhsCodeBlock