Remove tag compaction "optimizations"

The intention was to remove tags that won't have an effect and join
together consecutive tags.
However the patterns used can just as well appear in regular text, so
this can replace characters inside user defined text and not just
formatting tags.

Fixes 
This commit is contained in:
patrick96 2020-12-24 23:52:35 +01:00 committed by Patrick Ziegler
parent 64649a1e47
commit e30d2c4c1f
2 changed files with 4 additions and 11 deletions
src/components

View file

@ -646,16 +646,7 @@ bool controller::process_update(bool force) {
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, "F-}%{F#", "F#");
block_contents = string_util::replace_all(block_contents, "U-}%{U#", "U#");
block_contents = string_util::replace_all(block_contents, "u-}%{u#", "u#");
block_contents = string_util::replace_all(block_contents, "o-}%{o#", "o#");
// Join consecutive tags
contents += string_util::replace_all(block_contents, "}%{", " ");
contents += block_contents;
}
try {