mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 20:47:44 +02:00
fixed issue with find not working with symbols that should be escaped (#13792)
# Description Thanks to @weirdan's suggestion, this now works.  Closes #13789
This commit is contained in:
@ -193,7 +193,8 @@ pub fn highlight_search_string(
|
||||
string_style: &Style,
|
||||
highlight_style: &Style,
|
||||
) -> Result<String, ShellError> {
|
||||
let regex_string = format!("(?i){needle}");
|
||||
let escaped_needle = regex::escape(needle);
|
||||
let regex_string = format!("(?i){escaped_needle}");
|
||||
let regex = match Regex::new(®ex_string) {
|
||||
Ok(regex) => regex,
|
||||
Err(err) => {
|
||||
|
Reference in New Issue
Block a user