GNU bug report logs -
#48078
Verbatim environments with key-value arguments
Previous Next
Full log
View this message in rfc822 format
Dario Gjorgjevski <dario.gjorgjevski <at> gmail.com> writes:
Hi Dario,
> \begin{tcblisting}{%
> listing only,%
> title={Example shell session},
> minted language=shell-session,%
> minted options={},%
> }
> $ echo 'Hello, World!'
> Hello, World!
> \end{tcblisting}
>
> Feel free to add "tcblisting" to `LaTeX-verbtaim-environments' and
> check out the example above: You will see that everything after
> title={Example shell session} is fontified as verbatim.
>
> I would be happy to try and improve the regex so that it handles
> key-value arguments,
To handle all situations correctly is impossible. You can't properly
match nested constructs like balanced parens/braces using regular
expressions. For that, you'd need an actual parser.
But you can at least allow a fixed number of balanced braces, and I've
just done that in order to allow one level of nested {...} in mandatory
arguments. (We already allowed for one level of nested brackets in an
optional argument.)
I'll make a new ELPA release.
Thanks for the report and Bye,
Tassilo
This bug report was last modified 4 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.