fix(builder): Always close open tags on flush

Ref #186
This commit is contained in:
Michael Carlberg 2016-11-23 21:59:04 +01:00
parent ad510eb768
commit 48c709eb58

View File

@ -11,7 +11,6 @@ void builder::set_lazy(bool mode) {
} }
string builder::flush() { string builder::flush() {
if (m_lazy) {
while (m_counters[syntaxtag::A] > 0) cmd_close(true); while (m_counters[syntaxtag::A] > 0) cmd_close(true);
while (m_counters[syntaxtag::B] > 0) background_close(true); while (m_counters[syntaxtag::B] > 0) background_close(true);
while (m_counters[syntaxtag::F] > 0) color_close(true); while (m_counters[syntaxtag::F] > 0) color_close(true);
@ -21,7 +20,6 @@ string builder::flush() {
while (m_counters[syntaxtag::U] > 0) line_color_close(true); while (m_counters[syntaxtag::U] > 0) line_color_close(true);
while (m_counters[syntaxtag::u] > 0) underline_close(true); while (m_counters[syntaxtag::u] > 0) underline_close(true);
while (m_counters[syntaxtag::o] > 0) overline_close(true); while (m_counters[syntaxtag::o] > 0) overline_close(true);
}
string output = m_output.data(); string output = m_output.data();