parent
1b0d25a982
commit
24046d9f23
34
main.js
34
main.js
|
@ -1997,27 +1997,12 @@ function applycolorsonline(line, linediv, index, options)
|
|||
span.appendChild(document.createTextNode(headingtext));
|
||||
linediv.appendChild(span);
|
||||
}
|
||||
}
|
||||
else if (markerslist.every(marker =>
|
||||
{
|
||||
if (line.startsWith(marker))
|
||||
{
|
||||
var span = document.createElement("span");
|
||||
span.setAttribute("style", `color:${settings.accentcolor};`);
|
||||
span.appendChild(document.createTextNode(marker.replaceAll("*", settings.bulletrendering)));
|
||||
linediv.appendChild(span);
|
||||
linediv.appendChild(document.createTextNode(line.substring(marker.length)));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}))
|
||||
{
|
||||
// fallback
|
||||
linediv.appendChild(document.createTextNode(line || " "));
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// fallback
|
||||
//linediv.appendChild(document.createTextNode(line || " "));
|
||||
//return;
|
||||
|
||||
/* -----TODO------ */
|
||||
|
||||
|
@ -2039,7 +2024,14 @@ function applycolorsonline(line, linediv, index, options)
|
|||
line = temp;
|
||||
}
|
||||
|
||||
|
||||
// lists
|
||||
markerslist.forEach(marker =>
|
||||
{
|
||||
if (line.startsWith(marker))
|
||||
{
|
||||
line = line.replace(marker, "<span style='color:" + settings.accentcolor + "'>" + marker.replaceAll("*", settings.bulletrendering) + "</span>");
|
||||
}
|
||||
});
|
||||
|
||||
// md header
|
||||
if (index == 0 && line == "---")
|
||||
|
|
Loading…
Reference in New Issue