fix url count, fix #308

This commit is contained in:
Nicolas Constant 2020-08-28 21:08:23 -04:00
parent 8710b0267e
commit a809274756
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 1 additions and 1 deletions

View File

@ -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;