Should --crlf
change dot matching behavior?
#2372
-
However, the option description goes on and limits this to
I wonder if the option should change the behavior of Context: microsoft/vscode#87247 (comment) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is tracked by rust-lang/regex#244 --- And indeed, the last few comments talk about what I would somewhat rather we wait until CRLF support lands in the regex engine for this, but it could be some time before that happens. If someone wanted to submit a patch to ripgrep that rewrites |
Beta Was this translation helpful? Give feedback.
This is tracked by rust-lang/regex#244 --- And indeed, the last few comments talk about what
.
should do. The only real choice I think is to make it equivalent to[^\r\n]
when CRLF mode is enabled. Other options are not really compatible with the regex engine. (And indeed, the plan for$
in CRLF mode is for it to treat\r
and\n
each as line endings, but\r\n
as one single line ending. Ideally we wouldn't treat a lone\r
as a line ending---the days of macOS using that convention are long past us---but it is too difficult to do otherwise in the regex engine.)I would somewhat rather we wait until CRLF support lands in the regex engine for this, but it could be some time before that happens…