Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion script/micron-parser_original.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,12 @@ applyStyleToElement(el, style) {
break;

case 'F':
if (line[i+1] == "T" && line.length >= i + 8) { // truecolor tags (`FTxxxxxx)
let color = line.substr(i + 2, 6);
state.fg_color = color;
skip = 7;
break;
}
// next 3 chars => fg color
if (line.length >= i + 4) {
let color = line.substr(i + 1, 3);
Expand All @@ -631,6 +637,13 @@ applyStyleToElement(el, style) {
state.fg_color = this.SELECTED_STYLES.plain.fg;
break;
case 'B':
if (line[i+1] == "T" && line.length >= i + 8) { // truecolor tags (`FTxxxxxx)
let color = line.substr(i + 2, 6);
state.bg_color = color;
skip = 7;
flushPart(); // flush current part when background color changes
break;
}
// next 3 chars => bg color
if (line.length >= i + 4) {
let color = line.substr(i + 1, 3);
Expand Down Expand Up @@ -903,4 +916,4 @@ applyStyleToElement(el, style) {
}
}

window.MicronParser = MicronParser;
window.MicronParser = MicronParser;