Hi,
About Alexander Griffith / min-love2d-fennel
https://gitlab.com/alexjgriffith/min-love2d-fennel/-/blob/master/error-mode.fnl?ref_type=heads
The color-msg function in error-mode.fnl captures the ANSI escape
sequences generated by Löve2D and converts them to a Lua table
containing pre, selected, and post string interspersed with color
triplets.
I believe the ANSI sequence for inverted text is
Escape [ 7 m
The match function uses this pattern
"(.*)\027%[7m(.*)\027%[0m(.*)"
The "%" matches a digit, right? Is this correct?
Thank you.
P. S. I am in GMail and I keep hitting Escape. :-)
--
Claude Marinier
Claude Marinier <claudem223@gmail.com> writes:
> The match function uses this pattern
>
> "(.*)\027%[7m(.*)\027%[0m(.*)"
>
> The "%" matches a digit, right? Is this correct?
No, in Lua patterns the % character indicates an escape code, so it's
just matching against a literal [ rather than using [] to denote
character set.
-Phi