From 1bb8ab5e9b5b580e43915fdad24ea9806b1d5533 Mon Sep 17 00:00:00 2001 From: milarin Date: Fri, 30 Jun 2023 19:16:25 +0200 Subject: [PATCH] fixed IsWhitespace function consideres tabs as whitespace --- runefunc.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runefunc.go b/runefunc.go index cacf4de..a3afba0 100644 --- a/runefunc.go +++ b/runefunc.go @@ -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 {