Hi Bastien On Sat, Aug 11, 2012 at 11:59 PM, Bastien <b...@gnu.org> wrote: > Unless I miss something obvious, the current version returns exactly > the same thing than the one you propose -- can you double-check or let > me know what is wrong with the current solution?
Your solution is wrong when there is a “%” not immediately followed by “(”: On Sat, Aug 11, 2012 at 8:11 PM, Michael Brand <michael.ch.br...@gmail.com> wrote: > On Sat, Aug 11, 2012 at 6:55 PM, Bastien <b...@gnu.org> wrote: >> Michael Brand <michael.ch.br...@gmail.com> writes: >>> [...] >>> Also a small change against your latest patch to not stop at “%” >>> without following “(” and possibly miss a “%(” before. A realistic example, with point somewhere between “%” and the last “)”: “- %(capitalize "5 % less (see item \"3)\" below)\n")\n” This can happen with a feed template containing "- %(capitalize \"%description\")\n" and %description expanding to “5 % less (see item "3)" below)\n” All problems of the example are solved: - escaping of the quotes that surround the “3)” in string - seemingly unbalanced parenthesis in string coming from “3)” - newline within %(...) - “%” not immediately followed by “(” Michael