feat: Support underscore as a split character

This commit is contained in:
Clément Renault 2019-09-24 13:56:26 +02:00
parent cee5e50857
commit 6b9426a051
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -39,8 +39,8 @@ fn is_separator(c: char) -> bool {
fn classify_separator(c: char) -> Option<SeparatorCategory> {
match c {
' ' | '\'' | '"' => Some(Soft),
'.' | ';' | ',' | '!' | '?' | '-' | '(' | ')' => Some(Hard),
' ' | '\'' | ':' | '"' => Some(Soft),
'.' | ';' | ',' | '!' | '?' | '-' | '_' | '(' | ')' => Some(Hard),
_ => None,
}
}