Open jprotze opened 6 years ago
If the comment changed, I have seen that in some cases the color-highlighting was added. With the first part of this replacement being in comment, the result would not compile.
I'm checking, whether L3088 is sufficient to catch all cases.
For the restriction of lstinline to single line, I could not find something in the documentation. But my latex compiler complains with Package Listings Error: lstinline ended by EOL
If I have a linebreak in the inline code. According to a test, \verb
has the same limitation.
The full pull request patched latexdiff failed with testsuite/verbatim-{old,new}.tex so I cannot accept as is. I will look into this and isolate the actual commit causing this problem, as at least the adding of the config option should work smoothly and adds useful functionality but it will take a bit of time.
We found that lstinline has poor performance and triples compile time for our pdf compared to verb or simply a command containing \detokenize. The latter is also compatible with \DIFdel.
Nevertheless, I could find the bug and can add the changes if this is still of interest.
This PR adds the possibility to configure customized lstinline-like commands/shortcuts. For something like:
\newcommand\myJSsnippet{\lstinline[style=JavaScript,breaklines=true]}
You would add this to the config:LSTINLINEENV=myJSsnippet