changed the color of the chat links and unit test

This commit is contained in:
kharhamel 2021-01-22 15:01:10 +01:00
parent 3d84a9c8cd
commit 4ad7f4d5a3
3 changed files with 22 additions and 10 deletions

View file

@ -17,4 +17,11 @@ export class HtmlUtils {
elem.remove();
return elem as T;
}
public static urlify(text: string): string {
const urlRegex = /(https?:\/\/[^\s]+)/g;
return text.replace(urlRegex, (url: string) => {
return '<a href="' + url + '" target="_blank" style=":visited {color: white}">' + url + '</a>';
})
}
}