From 924bb6cb47981ad70c654b98b58fb716e32b71f1 Mon Sep 17 00:00:00 2001 From: hanishkvc Date: Tue, 25 Nov 2025 23:02:35 +0530 Subject: [PATCH] SimpleChatTCRV:MarkDown:HorizLine and Unordered list Allow for other valid char based markers wrt horizontal lines and unordered lists ?Also allow for spaces after horizontal line marker, in same line? --- tools/server/public_simplechat/typemd.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/server/public_simplechat/typemd.mjs b/tools/server/public_simplechat/typemd.mjs index a52281811b..458dbc34ae 100644 --- a/tools/server/public_simplechat/typemd.mjs +++ b/tools/server/public_simplechat/typemd.mjs @@ -43,7 +43,7 @@ export class MarkDown { } return } - if (line == '---') { + if (line.match(/^[-]{3,}|[*]{3,}|[_]{3,}\s*$/) != null) { this.unwind_list() this.html += "
\n" return @@ -61,7 +61,7 @@ export class MarkDown { this.html += `
\n`
             return
         }
-        let matchUnOrdered = line.match(/^([ ]*)[-*][ ](.*)$/);
+        let matchUnOrdered = line.match(/^([ ]*)[-+*][ ](.*)$/);
         if ( matchUnOrdered != null) {
             let sList = 'none'
             let listLvl = 0