diff --git a/tools/server/public_simplechat/typemd.mjs b/tools/server/public_simplechat/typemd.mjs index 7964223c2c..8a30d90742 100644 --- a/tools/server/public_simplechat/typemd.mjs +++ b/tools/server/public_simplechat/typemd.mjs @@ -70,8 +70,13 @@ export class MarkDown { if (lastOffset < curOffset){ this.in.list.offsets.push(curOffset) listLvl = this.in.list.offsets.length - this.html += "\n") + if (matchUnOrdered[2][matchUnOrdered[2].length-1] == '.') { + this.html += "
    \n" + this.in.list.endType.push("
\n") + } else { + this.html += "\n") + } } else if (lastOffset > curOffset){ while (this.in.list.offsets[this.in.list.offsets.length-1] > curOffset) { this.in.list.offsets.pop() @@ -192,7 +197,9 @@ export class MarkDown { if (this.process_list_unordered(line)) { return } - this.unwind_list() + if (line.trim().length > 0) { + this.unwind_list() + } this.html += `

${line}

` }