about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/twtstr.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index a0dd1b3f..6db61fc2 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -190,9 +190,6 @@ func isAlphaAscii*(r: Rune): bool =
 func isDigitAscii*(r: Rune): bool =
   return int(r) < 256 and isDigit(char(r))
 
-func breaksWord*(r: Rune): bool =
-  return not (r.isDigitAscii() or r.isAlpha())
-
 func substr*(s: seq[Rune], i, j: int): seq[Rune] =
   if s.len == 0:
     return @[]
@@ -853,6 +850,9 @@ func width*(s: seq[Rune], min: int): int =
     result += width(s[i])
     inc i
 
+func breaksWord*(r: Rune): bool =
+  return not (r.isDigitAscii() or r.isAlpha() or r.width() == 0)
+
 const CanHaveDakuten = "かきくけこさしすせそたちつてとはひふへほカキクケコサシスセソタチツテトハヒフヘホ".toRunes()
 
 const CanHaveHandakuten = "はひふへほハヒフヘホ".toRunes()