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.
This commit is contained in:
John MacFarlane 2018-10-08 21:45:39 -07:00
parent f8879ee0a1
commit 6d87af8882

View file

@ -655,7 +655,10 @@ blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
[ (if key == "startFrom"
then "firstnumber"
else key) ++ "=" ++ mbBraced attr |
(key,attr) <- keyvalAttr ] ++
(key,attr) <- keyvalAttr,
key `notElem` ["exports", "tangle", "results"]
-- see #4889
] ++
(if identifier == ""
then []
else [ "label=" ++ ref ])