diff options
author | Andrew Gallant <jamslam@gmail.com> | 2021-05-29 07:34:14 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2021-05-29 07:37:28 -0400 |
commit | 581a35e568c3acd32461d276a4cfe746524e17cd (patch) | |
tree | ef3de275dfeb8a0f93db684157d03dadcd6c5386 /CHANGELOG.md | |
parent | ba965962fe2fc3513aeeaa99665f09099d92045d (diff) |
impl: fix --multiline anchored match bug
This fixes a bug where using \A or (?-m)^ in combination with
-U/--multiline would permit matches that aren't anchored to the
beginning of the file. The underlying cause was an optimization that
occurred when mmaps couldn't be used. Namely, ripgrep tries to still
read the input incrementally if it knows the pattern can't match through
a new line. But the detection logic was flawed, since it didn't account
for line anchors. This commit fixes that.
Fixes #1878, Fixes #1879
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d0e1175..fc64451d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ Bug fixes: Fix stdin detection when using PowerShell in UNIX environments. * [BUG #1866](https://github.com/BurntSushi/ripgrep/issues/1866#issuecomment-841635553): Fix bug when computing column numbers in `--vimgrep` mode. +* [BUG #1878](https://github.com/BurntSushi/ripgrep/issues/1878): + Fix bug where `\A` could produce unanchored matches in multiline search. 12.1.1 (2020-05-29) |