mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 12:18:07 +02:00
support raw strings in match patterns (#14573)
Fixes #14554 # User-Facing Changes Raw strings are now supported in match patterns: ```diff match "foo" { r#'foo'# => true, _ => false } -false +true ```
This commit is contained in:
@ -128,7 +128,7 @@ impl Matcher for Pattern {
|
||||
false
|
||||
}
|
||||
}
|
||||
Expr::String(x) => {
|
||||
Expr::String(x) | Expr::RawString(x) => {
|
||||
if let Value::String { val, .. } = &value {
|
||||
x == val
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user