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, "<!");