fixed IsWhitespace function consideres tabs as whitespace

This commit is contained in:
milarin 2023-06-30 19:16:25 +02:00
parent 19e0a61345
commit 1bb8ab5e9b

View File

@ -12,8 +12,12 @@ func IsSpace(rn rune) bool {
return rn == ' '
}
func IsTab(rn rune) bool {
return rn == '\t'
}
func IsWhitespace(rn rune) bool {
return IsSpace(rn) || IsNewLine(rn)
return IsSpace(rn) || IsTab(rn) || IsNewLine(rn)
}
func And(f ...RuneFunc) RuneFunc {