summaryrefslogtreecommitdiffstats
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorJakub Wieczorek <jakub.adam.wieczorek@gmail.com>2019-09-05 13:39:08 +0000
committerAndrew Gallant <jamslam@gmail.com>2020-02-17 17:16:28 -0500
commitb435eaafc805b1edb12b04d72de0e0ce113059f9 (patch)
tree764b68ae6ef5d328cff5b074debbcdeb77dbe797 /CHANGELOG.md
parentf8e70294d5741391521f638b80ba786888896b94 (diff)
grep-regex: fix inner literal extraction bug
This appears to be another transcription bug from copying this code from the prefix literal detection from inside the regex crate. Namely, when it comes to inner literals, we only want to treat counted repetition as two separate cases: the case when the minimum match is 0 and the case when the minimum match is more than 0. In the former case, we treat `e{0,n}` as `e*` and in the latter we treat `e{m,n}` where `m >= 1` as just `e`. We could definitely do better here. e.g., This means regexes like `(foo){10}` will only have `foo` extracted as a literal, where searching for the full literal would likely be faster. The actual bug here was that we were not implementing this logic correctly. Namely, we weren't always "cutting" the literals in the second case to prevent them from being expanded. Fixes #1319, Closes #1367
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0d294df..aa92d4f7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,8 @@ Bug fixes:
* [BUG #1291](https://github.com/BurntSushi/ripgrep/issues/1291):
ripgrep now works in non-existent directories.
+* [BUG #1319](https://github.com/BurntSushi/ripgrep/issues/1319):
+ Fix match bug due to errant literal detection.
* [**BUG #1335**](https://github.com/BurntSushi/ripgrep/issues/1335):
Fixes a performance bug when searching plain text files with very long lines.
This was a serious performance regression in some cases.