Arrow functions and so
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
@ -2,8 +2,7 @@ import { urlRegex } from './url-regex';
|
||||
|
||||
const urlPlaceholder = 'xxxxxxxxxxxxxxxxxxxxxxx';
|
||||
|
||||
export function countableText(inputText: string) {
|
||||
return inputText
|
||||
export const countableText = (inputText: string) =>
|
||||
inputText
|
||||
.replace(urlRegex, urlPlaceholder)
|
||||
.replace(/(^|[^/\w])@(([a-z0-9_]+)@[a-z0-9.-]+[a-z0-9]+)/ig, '$1@$3');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user