mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2024-12-12 19:18:24 +02:00
112b3c5e0a
The handling of the -o/--only-matching was incorrect. We cannot ever re-run regexes on a *subset* of a matched line, because it doesn't take into account zero width assertions on the edges of the regex. This occurs whenever an end user uses an assertion explicity, but also occurs when one is used implicitly, e.g., with the `-w` flag. This instead reuses the initial matched range from the first regex match. We also apply this fix to coloring. Fixes #493 |
||
---|---|---|
.. | ||
hay.rs | ||
tests.rs | ||
workdir.rs |