Add pipe character to allowed word boundaries
This commit is contained in:
parent
d5cd179a2d
commit
e6a5c20d42
@ -23,6 +23,7 @@ fn is_character_word_boundary(c: char) -> bool
|
||||
| '*'
|
||||
| '/'
|
||||
| '%'
|
||||
| '|'
|
||||
=> true,
|
||||
_ => false,
|
||||
}
|
||||
@ -71,6 +72,7 @@ mod tests
|
||||
assert_eq!(word_boundary("*rest"), Ok(("*rest", ())));
|
||||
assert_eq!(word_boundary("/rest"), Ok(("/rest", ())));
|
||||
assert_eq!(word_boundary("%rest"), Ok(("%rest", ())));
|
||||
assert_eq!(word_boundary("|rest"), Ok(("|rest", ())));
|
||||
assert!(word_boundary("0").is_err());
|
||||
assert!(word_boundary("rest").is_err());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user