From a80927475675a38ab8b1a532f8d821f548912661 Mon Sep 17 00:00:00 2001 From: Nicolas Constant Date: Fri, 28 Aug 2020 21:08:23 -0400 Subject: [PATCH] fix url count, fix #308 --- src/app/components/create-status/create-status.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/create-status/create-status.component.ts b/src/app/components/create-status/create-status.component.ts index 22ea854d..7b89e30a 100644 --- a/src/app/components/create-status/create-status.component.ts +++ b/src/app/components/create-status/create-status.component.ts @@ -663,7 +663,7 @@ export class CreateStatusComponent implements OnInit, OnDestroy { private getLinksExtraChars(status: string): number { let mentionExtraChars = 0; - let links = status.split(' ').filter(x => x.startsWith('http://') || x.startsWith('https://')); + let links = status.split(/\s+/).filter(x => x.startsWith('http://') || x.startsWith('https://')); for (let link of links) { if (link.length > 23) { mentionExtraChars += link.length - 23;