Collapsing whitespace doesn't work when non-whitespace characters are matched
Closed this issue · 1 comments
acheronfail commented
Reproduce:
printf "bar\nbar\n\nbarbar\n" > foo
rgr -U 'bar(\n)*' ./foo
After changing how whitespace is rendered, modes c
or a
should result in the match collapsing into a single line.
acheronfail commented
This is actually invalid - the above example results in multiple matches, and the collapsing whitespace behaviour only applies for matches.
For example:
printf "bar\nbar\n\nbarbar\n" > foo
rgr -U '(bar\n?)+' ./foo