This commit is contained in:
mgabdev
2020-04-28 22:24:35 -04:00
parent c3d0d8bde2
commit 5efe40f301
34 changed files with 448 additions and 557 deletions

View File

@@ -0,0 +1,9 @@
import { urlRegex } from './url_regex'
const urlPlaceholder = 'xxxxxxxxxxxxxxxxxxxxxxx'
export function countableText(inputText) {
return inputText
.replace(urlRegex, urlPlaceholder)
.replace(/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/ig, '$1@$3');
}