From 9dabe899f3ce2cb929519b208d861c34397780d7 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Wed, 27 Sep 2023 22:21:28 +0200 Subject: [PATCH] fix: bold and italics on same line --- main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 5436ac7..5204a01 100644 --- a/main.js +++ b/main.js @@ -2215,8 +2215,8 @@ function applycolors() line = line.replace(/(\[\[.*\]\])/g, "$1"); // bold and italics - line = line.replace(/(\*\*.*\*\*)/g, "$1"); - line = line.replace(/(^\*\*.*\*)/g, "$1"); + line = line.replace(/\*\*([^\*]*)\*\*/g, "**$1**"); + line = line.replace(/\*([^\*]*)\*/g, "*$1*"); // comments line = line.replace(/<\!/g, "<!");