regex: some minor polish
I think I already did a clean-up of this crate when I moved it to regex 1.9, so the polish here is very minor.
This commit is contained in:
@@ -20,11 +20,11 @@ use crate::error::{Error, ErrorKind};
|
||||
///
|
||||
/// Note that as of regex 1.9, this routine could theoretically be implemented
|
||||
/// without returning an error. Namely, for example, we could turn
|
||||
/// `foo\nbar` into `foo[a&&b]bar`. That is, replace line terminators with a
|
||||
/// `foo\nbar` into `foo[a&&b]bar`. That is, replace line terminator with a
|
||||
/// sub-expression that can never match anything. Thus, ripgrep would accept
|
||||
/// such regexes and just silently not match anything. Regex versions prior to 1.8
|
||||
/// don't support such constructs. I ended up deciding to leave the existing
|
||||
/// behavior of returning an error instead. For example:
|
||||
/// such regexes and just silently not match anything. Regex versions prior
|
||||
/// to 1.8 don't support such constructs. I ended up deciding to leave the
|
||||
/// existing behavior of returning an error instead. For example:
|
||||
///
|
||||
/// ```text
|
||||
/// $ echo -n 'foo\nbar\n' | rg 'foo\nbar'
|
||||
|
||||
Reference in New Issue
Block a user