diff --git a/main.js b/main.js
index a7d271b..2245ab4 100644
--- a/main.js
+++ b/main.js
@@ -2008,24 +2008,23 @@ function rawline2html(line, index, options)
{
options.code = true;
options.language = line.substring(3);
- line = "" + line;
+ line = "" + line.replace(new RegExp("(" + options.language + ")"), "$1") + "
";
}
else if (line == "```" && options.code)
{
options.code = false;
options.language = "";
- line = line + "";
+ line = "
" + line + "
";
}
else if (options.code)
{
- //breaks html escape
- //line = line.replace(/\b(\d+)\b/g, "$1");
+ line = "" + (line || emptyline) + "
";
if (languagekeywords[options.language])
{
var keywords = languagekeywords[options.language];
keywords.forEach(keyword =>
{
- line = line.replace(new RegExp("\\b(" + keyword + ")\\b", "ig"), "$1");
+ line = line.replace(new RegExp("\\b(" + keyword + ")\\b", "ig"), "$1");
});
}
}