refac: escapeHtml, nl2br, TemplateEngine 분리

This commit is contained in:
2021-08-26 01:37:46 +09:00
parent b02bf2e596
commit 342f20a5a6
9 changed files with 76 additions and 82 deletions
+4
View File
@@ -0,0 +1,4 @@
export function nl2br(text: string): string {
return text.replace(/\n/g, "<br>");
}