Categorize _ as a word char, not punctuation

This commit is contained in:
Blaž Hrastnik 2021-05-31 21:09:17 +09:00
parent 0dde5f2cae
commit 2cc30cd07c

View file

@ -189,10 +189,10 @@ fn categorize(ch: char) -> Category {
Category::Eol
} else if ch.is_ascii_whitespace() {
Category::Whitespace
} else if is_word(ch) {
Category::Word
} else if ch.is_ascii_punctuation() {
Category::Punctuation
} else if ch.is_ascii_alphanumeric() {
Category::Word
} else {
unreachable!()
}