mobilizon/js/src/utils/html.ts
Thomas Citharel 4144e9ffd0
Introduce group basic federation, event new page and notifications
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2020-06-03 16:01:26 +02:00

4 lines
90 B
TypeScript

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