fix url count, fix #308
This commit is contained in:
parent
8710b0267e
commit
a809274756
|
@ -663,7 +663,7 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
|
||||||
|
|
||||||
private getLinksExtraChars(status: string): number {
|
private getLinksExtraChars(status: string): number {
|
||||||
let mentionExtraChars = 0;
|
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) {
|
for (let link of links) {
|
||||||
if (link.length > 23) {
|
if (link.length > 23) {
|
||||||
mentionExtraChars += link.length - 23;
|
mentionExtraChars += link.length - 23;
|
||||||
|
|
Loading…
Reference in New Issue