2017-07-28 22:06:29 +00:00
|
|
|
const urlPlaceholder = 'xxxxxxxxxxxxxxxxxxxxxxx';
|
|
|
|
|
|
|
|
export function countableText(inputText) {
|
|
|
|
return inputText
|
2017-07-31 13:19:48 +00:00
|
|
|
.replace(/https?:\/\/\S+/g, urlPlaceholder)
|
2017-07-28 22:06:29 +00:00
|
|
|
.replace(/(?:^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+)/ig, '@$2');
|
|
|
|
};
|