From 65c97ae1e0094c6de01cd0cf759d2aaefa570902 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Tue, 19 Nov 2024 18:40:13 +0700 Subject: [PATCH] feat: fix highlighing --- libraries/helpers/src/utils/count.length.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/helpers/src/utils/count.length.ts b/libraries/helpers/src/utils/count.length.ts index cd9715f2..02976874 100644 --- a/libraries/helpers/src/utils/count.length.ts +++ b/libraries/helpers/src/utils/count.length.ts @@ -13,10 +13,10 @@ export const textSlicer = ( } } - const {validRangeEnd} = twitter.parseTweet(text); + const {validRangeEnd, valid} = twitter.parseTweet(text); return { start: 0, - end: validRangeEnd + end: valid ? end : validRangeEnd } };