Change to is_hashtag_chat to support non-latin characters

This commit is contained in:
cr0bar
2023-07-10 21:28:10 +01:00
committed by William Casarin
parent e83e110adb
commit 2353f97114

View File

@@ -415,7 +415,7 @@ func parse_while(_ p: Parser, match: (Character) -> Bool) -> String? {
}
func is_hashtag_char(_ c: Character) -> Bool {
return c.isLetter || c.isNumber
return (c.isLetter || c.isNumber || c.isASCII) && (!c.isPunctuation && !c.isWhitespace)
}
func prev_char(_ p: Parser, n: Int) -> Character? {