diff --git a/src/components/CommentItem.vue b/src/components/CommentItem.vue index dd2fbdf..5eedf72 100644 --- a/src/components/CommentItem.vue +++ b/src/components/CommentItem.vue @@ -196,26 +196,28 @@ domPurifyInstance.addHook('uponSanitizeElement', (node) => { node.outerHTML = `
${quoteHTML}
`; } else if (new RegExp('^(-|\\*) ?.').test(node.innerHTML)) { - // unordered list (starts with '-' or '*') + // unordered list (starts with dash or asterisk) let listItemHTML = node.innerHTML; while (new RegExp('^(-|\\*| )').test(listItemHTML)) { listItemHTML = listItemHTML.substring(1); } + listItemHTML = listItemHTML.replace(/\n(-|\*) ?/g, '