From 11add81bf83a55ce4fba7ee83e3dd5b0ec4c9817 Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Tue, 10 Oct 2023 11:55:21 +0200 Subject: [PATCH] Some attempts to keep bold font width --- main.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 983c942..57d1d2c 100644 --- a/main.js +++ b/main.js @@ -2100,6 +2100,11 @@ function applycolors() return; } + var boldstyle = "-webkit-text-stroke-width: 0.5px;"; + //var boldstyle = "font-weight: bold; letter-spacing: 0;"; + //var boldstyle = "font-weight: bold;"; + //var boldstyle = "text-shadow: 0 0 0.01px black;"; + var lines = md.value.split("\n"); var header = false; var code = false; @@ -2113,7 +2118,7 @@ function applycolors() if (line.startsWith("#")) { line = line.replace(/(#* )/, "$1"); // to check! - line = "" + line + ""; + line = "" + line + ""; } // bold and italics @@ -2122,8 +2127,9 @@ function applycolors() { temp = line.substring(2); } - temp = temp.replace(/\*\*([^\*]*)\*\*/g, "**$1**"); + temp = temp.replace(/\*\*([^\*]*)\*\*/g, "**$1**"); temp = temp.replace(/\*([^\*]*)\*/g, "*$1*"); + if (line.startsWith("* ")) { line = "* " + temp;