2017-09-16 16:01:15 +03:00
|
|
|
import { urlRegex } from './url_regex';
|
|
|
|
|
2021-03-02 13:02:56 +02:00
|
|
|
const urlPlaceholder = '$2xxxxxxxxxxxxxxxxxxxxxxx';
|
2017-07-29 01:06:29 +03:00
|
|
|
|
|
|
|
export function countableText(inputText) {
|
|
|
|
return inputText
|
2017-09-16 16:01:15 +03:00
|
|
|
.replace(urlRegex, urlPlaceholder)
|
2017-11-07 20:08:14 +02:00
|
|
|
.replace(/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/ig, '$1@$3');
|
2023-02-03 21:52:07 +02:00
|
|
|
}
|