Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color ordering fix #216

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open

Conversation

jmenashe
Copy link

@jmenashe jmenashe commented Jun 6, 2022

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

Fixes #215.

…stent with configured color lists and regex groups.
@CoelacanthusHex
Copy link

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

@PBudmark
Copy link

As I stated in recent comment to issue #215, this is actually no error, but could get some clarifications in documentation.

The first color in color list refers th the whole matched string, and following colors refer to the individual groups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants