Categorize _ as a word char, not punctuation
This commit is contained in:
parent
0dde5f2cae
commit
2cc30cd07c
|
@ -189,10 +189,10 @@ fn categorize(ch: char) -> Category {
|
||||||
Category::Eol
|
Category::Eol
|
||||||
} else if ch.is_ascii_whitespace() {
|
} else if ch.is_ascii_whitespace() {
|
||||||
Category::Whitespace
|
Category::Whitespace
|
||||||
|
} else if is_word(ch) {
|
||||||
|
Category::Word
|
||||||
} else if ch.is_ascii_punctuation() {
|
} else if ch.is_ascii_punctuation() {
|
||||||
Category::Punctuation
|
Category::Punctuation
|
||||||
} else if ch.is_ascii_alphanumeric() {
|
|
||||||
Category::Word
|
|
||||||
} else {
|
} else {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue