mobilizon/js/src/utils/html.ts

4 lines
90 B
TypeScript
Raw Normal View History

2019-04-26 13:22:16 +00:00
export function nl2br(text: string) {
return text.replace(/(?:\r\n|\r|\n)/g, "<br>");
2019-04-26 13:22:16 +00:00
}