From c0929dbae8850b1964c74190fc8eab331d4d26c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=97=D0=B0?= =?UTF-8?q?=D0=B2=D0=BE=D0=B4=D1=81=D0=BA=D0=BE=D0=B9?= Date: Fri, 14 Jun 2024 01:51:44 +0300 Subject: [PATCH] fix word splitting (#11) --- src/VahterBanBot/Antispam.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/VahterBanBot/Antispam.fs b/src/VahterBanBot/Antispam.fs index 8f60678..7360fd7 100644 --- a/src/VahterBanBot/Antispam.fs +++ b/src/VahterBanBot/Antispam.fs @@ -76,8 +76,9 @@ let distillWords (str: string) = let isCyr = c >= 'а' && c <= 'я' // who cares about Ё let isDigit = c >= '0' && c <= '9' let isDollar = c = '$' // useful + let isAnySpace = Char.IsWhiteSpace(c) - isLat || isCyr || isDigit || isDollar + isLat || isCyr || isDigit || isDollar || isAnySpace let filteredStr = String.filter isCyrLatAlphaChar (str.ToLower())