You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
274 B
10 lines
274 B
7 years ago
|
import { urlRegex } from './url_regex';
|
||
|
|
||
7 years ago
|
const urlPlaceholder = 'xxxxxxxxxxxxxxxxxxxxxxx';
|
||
|
|
||
|
export function countableText(inputText) {
|
||
|
return inputText
|
||
7 years ago
|
.replace(urlRegex, urlPlaceholder)
|
||
7 years ago
|
.replace(/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/ig, '$1@$3');
|
||
7 years ago
|
};
|