From 89fb6cc1a992dc7f1a699092f64e3da680828dcb Mon Sep 17 00:00:00 2001 From: phiresky Date: Mon, 17 Jun 2019 12:59:28 +0200 Subject: [PATCH] fix file ending regex (#13) --- CHANGELOG.md | 4 ++++ src/matching.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9c12a1..134e66a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.9.2 (2019-06-17) + +- Fix file ending regex ([#13](https://github.com/phiresky/ripgrep-all/issues/13)) + # 0.9.1 (2019-06-16) - Add enabled adapters to cache key if caching for archive diff --git a/src/matching.rs b/src/matching.rs index a62de7e..2d2644a 100644 --- a/src/matching.rs +++ b/src/matching.rs @@ -42,7 +42,7 @@ pub struct FileMeta { } pub fn extension_to_regex(extension: &str) -> Regex { - Regex::new(&format!(".*\\.{}", ®ex::escape(extension))).expect("we know this regex compiles") + Regex::new(&format!("\\.{}$", ®ex::escape(extension))).expect("we know this regex compiles") } pub fn adapter_matcher>(