mobilizon/js/src/utils/html.ts

4 lines
90 B
TypeScript
Raw Normal View History

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