mobilizon/js/src/utils/html.ts
Thomas Citharel da42522073
Fix eslint warnings
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-11-30 12:48:21 +01:00

4 lines
98 B
TypeScript

export function nl2br(text: string): string {
return text.replace(/(?:\r\n|\r|\n)/g, "<br>");
}