line to html now workie

This commit is contained in:
Lee 2024-04-16 20:47:50 +01:00
parent 45fb517385
commit bedde3b0eb

@ -78,13 +78,17 @@ public final class ColorUtils {
if (nextIsColor) { // Map the current color to its hex code if (nextIsColor) { // Map the current color to its hex code
String color = COLOR_MAP.getOrDefault(Character.toLowerCase(character), ""); String color = COLOR_MAP.getOrDefault(Character.toLowerCase(character), "");
builder.append("<span style=\"color:").append(color); builder.append("<span style=\"color:").append(color);
if (character == 'l') { // Bold if (character == 'l') { // Make the char bold
builder.append(";font-weight:bold"); builder.append(";font-weight:bold");
} }
builder.append("\">"); builder.append("\">");
nextIsColor = false; nextIsColor = false;
continue; continue;
} }
if (character == ' ') { // Preserve space character
builder.append("&nbsp;");
continue;
}
builder.append(character); // Append the char... builder.append(character); // Append the char...
} }