Skip to content

Conversation

@rwe
Copy link
Contributor

@rwe rwe commented Oct 21, 2021

$ansi_color_regex is defined as (…)? and so /^$ansi_color_regex/ will always match. This PR factors the ANSI-sequence part of the regex itself and checks (non-optionally) against that.

Additionally, the logic checking starts_with_ansi was inverted, likely to compensate for the above error, but as a side effect forcing diff-so-fancy always to color lines unnecessarily.

@scottchiefbaker scottchiefbaker merged commit c3205c8 into so-fancy:master Oct 21, 2021
@scottchiefbaker
Copy link
Contributor

Interesting... good catch!

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.

2 participants