fix: newline_to_br filter should output <br /> instead of <br/>, fixes #320

This commit is contained in:
Jun Yang
2021-03-13 17:14:10 +08:00
parent 99d14e76d7
commit 9a9b792c63
3 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export function escapeOnce (str: string) {
}
export function newlineToBr (v: string) {
return v.replace(/\n/g, '<br/>')
return v.replace(/\n/g, '<br />\n')
}
export function stripHtml (v: string) {