parent
cd005a9ce6
commit
c6e861083b
@ -73,6 +73,8 @@ class renderer {
|
|||||||
|
|
||||||
uint32_t m_background{0};
|
uint32_t m_background{0};
|
||||||
uint32_t m_foreground{0};
|
uint32_t m_foreground{0};
|
||||||
|
gc m_background_gc{gc::NONE};
|
||||||
|
gc m_foreground_gc{gc::NONE};
|
||||||
|
|
||||||
edge m_reserve_at{edge::NONE};
|
edge m_reserve_at{edge::NONE};
|
||||||
uint16_t m_reserve;
|
uint16_t m_reserve;
|
||||||
|
@ -550,9 +550,15 @@ void controller::on_update() {
|
|||||||
block_contents += padding_right;
|
block_contents += padding_right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Strip unnecessary reset tags
|
||||||
|
block_contents = string_util::replace_all(block_contents, "T-}%{T", "T");
|
||||||
block_contents = string_util::replace_all(block_contents, "B-}%{B#", "B#");
|
block_contents = string_util::replace_all(block_contents, "B-}%{B#", "B#");
|
||||||
block_contents = string_util::replace_all(block_contents, "F-}%{F#", "F#");
|
block_contents = string_util::replace_all(block_contents, "F-}%{F#", "F#");
|
||||||
block_contents = string_util::replace_all(block_contents, "T-}%{T", "T");
|
block_contents = string_util::replace_all(block_contents, "U-}%{U#", "U#");
|
||||||
|
block_contents = string_util::replace_all(block_contents, "Uu-}%{Uu#", "Uu#");
|
||||||
|
block_contents = string_util::replace_all(block_contents, "Uo-}%{Uo#", "Uo#");
|
||||||
|
|
||||||
|
// Join consecutive tags
|
||||||
contents += string_util::replace_all(block_contents, "}%{", " ");
|
contents += string_util::replace_all(block_contents, "}%{", " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,10 +64,12 @@ void parser::codeblock(string data) {
|
|||||||
|
|
||||||
case 'U':
|
case 'U':
|
||||||
if (g_signals::parser::color_change) {
|
if (g_signals::parser::color_change) {
|
||||||
if (value[0] == 'u' && data.find(" Uu") == string::npos) {
|
if (value[0] == 'u') {
|
||||||
g_signals::parser::color_change(gc::UL, parse_color(value.substr(1), m_bar.underline.color));
|
if (data.find(" Uu") == string::npos)
|
||||||
} else if (value[0] == 'o' && data.find(" Uo") == string::npos) {
|
g_signals::parser::color_change(gc::UL, parse_color(value.substr(1), m_bar.underline.color));
|
||||||
g_signals::parser::color_change(gc::OL, parse_color(value.substr(1), m_bar.overline.color));
|
} else if (value[0] == 'o') {
|
||||||
|
if (data.find(" Uo") == string::npos)
|
||||||
|
g_signals::parser::color_change(gc::OL, parse_color(value.substr(1), m_bar.overline.color));
|
||||||
} else if (data.find(" U") == string::npos) {
|
} else if (data.find(" U") == string::npos) {
|
||||||
g_signals::parser::color_change(gc::UL, parse_color(value, m_bar.underline.color));
|
g_signals::parser::color_change(gc::UL, parse_color(value, m_bar.underline.color));
|
||||||
g_signals::parser::color_change(gc::OL, parse_color(value, m_bar.overline.color));
|
g_signals::parser::color_change(gc::OL, parse_color(value, m_bar.overline.color));
|
||||||
|
Loading…
Reference in New Issue
Block a user