garabik / grc

generic colouriser
http://kassiopeia.juls.savba.sk/~garabik/software/grc.html
Other
1.9k stars 162 forks source link

Color ordering fix #216

Open jmenashe opened 2 years ago

jmenashe commented 2 years ago

Modified pattern coloring process to apply coloring in an order consistent with configured color lists and regex groups.

Fixes garabik/grc#215.

CoelacanthusHex commented 2 years ago

It cause an error:

Traceback (most recent call last):
  File "/usr/bin/grcat", line 238, in <module>
    add2list(clist, m, pattern['colours'])
  File "/usr/bin/grcat", line 105, in add2list
    clist.append((m.start(group+1), m.end(group+1), patterncolour[group]))
IndexError: list index out of range

when I use for journalctl It also lead wrong color for gpg