4 lines
90 B
TypeScript
4 lines
90 B
TypeScript
|
export function nl2br(text: string) {
|
||
|
return text.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
||
|
}
|