changed: use shadow instead of bold to allow bold with non-monospace fonts

This commit is contained in:
quenousimporte 2023-11-07 11:35:32 +01:00
parent ff96f87b68
commit 4f248185ee
1 changed files with 5 additions and 5 deletions

10
main.js
View File

@ -1955,7 +1955,7 @@ function rawline2html(line, index, options)
if (line.startsWith("#"))
{
line = line.replace(/(#* )/, "<span style='color:" + settings.accentcolor + "'>$1</span>"); // to check!
line = "<span style='font-weight: bold;'>" + line + "</span>";
line = "<span style='text-shadow: 1px 0 0;'>" + line + "</span>";
}
// bold and italics
@ -1964,7 +1964,7 @@ function rawline2html(line, index, options)
{
temp = line.substring(2);
}
temp = temp.replace(/\*\*([^\*]*)\*\*/g, "<span style='font-weight: bold;'>&#42;&#42;$1&#42;&#42;</span>");
temp = temp.replace(/\*\*([^\*]*)\*\*/g, "<span style='text-shadow: 1px 0 0;'>&#42;&#42;$1&#42;&#42;</span>");
temp = temp.replace(/\*([^\*]*)\*/g, "<em>&#42;$1&#42;</em>");
if (line.startsWith("* "))
@ -1996,7 +1996,7 @@ function rawline2html(line, index, options)
{
options.header = false;
}
line = line || "<br>";
line = line || emptyline;
line = "<span style='color:lightgrey'>" + line + "</span>";
}
@ -2090,8 +2090,8 @@ function rawline2html(line, index, options)
}
else
{
line = line.replace(/(\(\w\))/g, "<span style='font-weight:bold; color:" + settings.accentcolor + "'>$1</span>");
line = line.replace(/(@\w*)/g, "<b style='color:grey'>$1</b>");
line = line.replace(/(\(\w\))/g, "<span style='text-shadow: 1px 0 0; color:" + settings.accentcolor + "'>$1</span>");
line = line.replace(/(@\w*)/g, "<span style='text-shadow: 1px 0 0; color:grey'>$1</span>");
line = line.replace(/(\s\+\w*)/g, "<span style='color:grey'>$1</span>");
}
}