diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-08 21:45:39 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-08 21:45:39 -0700 |
commit | 6d87af888296fefc940ef121732a212d1e71d67d (patch) | |
tree | 2316192293e78a96c7fb6a5ae504ff62a91afb11 /src/Text/Pandoc/Writers | |
parent | f8879ee0a1f00bcf1ead9dce0576c381cbcae778 (diff) | |
download | pandoc-6d87af888296fefc940ef121732a212d1e71d67d.tar.gz |
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.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 891c20f07..11d58b90a 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -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 ]) |