Page 1 of 1

[0.17.33] Empty rich text tags should be removed automatically

Posted: Wed Apr 24, 2019 6:02 pm
by Linnun
It's as simple as this:

Step 1: write

Code: Select all

Something [color=green][/color]
somewhere in your train station name

Now the train station name has an invisible tag inside that cannot be used anymore. You can make it visible again to prove it's there:

Step 2: Go one left with your cursor (press arrow left once), then type

Code: Select all

[color=green]
This will make the previously invisible color tag visible again (due to a formatting issue I guess).


Suggestion: If someone creates an empty color or font tag, just remove it completely

Re: [0.17.33] Empty rich text tags should be removed automatically

Posted: Thu Apr 25, 2019 1:16 pm
by wheybags
Thanks for the report, but this is intended behaviour.
The only way you can make this happen is to actually type it in empty, which is a pretty unlikely thing to happen by accident.
Whenever text is deleted (eg, by pressing backspace), empty tags will be cleaned up. This is because that is the only reasonable way you can end up in this scenario (eg, by typing some text inside a color tag, then deleting the text).
We could perform cleanup after every insert, but that would be expensive, and not really useful.
As such, I will move this to "not a bug"