The remarkup syntax to generate a figlet and cowsay is basically one of:
- interpreter {{{text}}}
- interpreter (options) {{{text}}}
However the corresponding regex matches on any preceding string for interpreter, such as a {{{a}}} a.
This very generic parser was designed to render a "No interpreter found" error message when your "interpreter"
was not already registered. But, in some cases it was also causing a:
RuntimeException: Undefined array key
Since it's probably not nice to explode in these cases, and since it's not nice to replace the user input with a
potentially confusing error message if you want just say foo {{{bar}}}, we just try to be even more nice:
we preserve the user input as-is, we still allow full flexibility to add custom extensions with weird parsers, but,
we log potential problems, to still make it known that something is probably not OK.
Your weird comments are safe now.
Long life to cowsay and figlet, BTW.
Proof of concept:
Closes T15372