git.iko.soy/typeable/pandoc
on master help sign in
LaTeX writer with `--listings`: don't pass through org-babel attributes.

So far: just, tangle, exports, results which are used by org mode. It might be better to use a whitelist of legal listings attributes, but there are a large number, and these may change. Closes #4889.

commit6d87af888296fefc940ef121732a212d1e71d67d authorJohn MacFarlane <jgm@berkeley.edu> dateMon 8 Oct 2018, 21:45 (8 years ago) parentf8879ee
1 file changed+4−1
src/Text/Pandoc/Writers/LaTeX.hs+4−1
src/Text/Pandoc/Writers/LaTeX.hs+4−1
@@ -655,7 +655,10 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
655655 [ (if key == "startFrom"
656656 then "firstnumber"
657657 else key) ++ "=" ++ mbBraced attr |
658− (key,attr) <- keyvalAttr ] ++
658+ (key,attr) <- keyvalAttr,
659+ key `notElem` ["exports", "tangle", "results"]
660+ -- see #4889
661+ ] ++
659662 (if identifier == ""
660663 then []
661664 else [ "label=" ++ ref ])