Categorize _ as a word char, not punctuation

pull/19/head
Blaž Hrastnik 3 years ago
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…
Cancel
Save