[0.17.33] Empty rich text tags should be removed automatically

Bugs that are actually features.
Linnun
Inserter
Inserter
Posts: 48
Joined: Fri Dec 15, 2017 5:51 am
Contact:

[0.17.33] Empty rich text tags should be removed automatically

Post 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
User avatar
wheybags
Former Staff
Former Staff
Posts: 328
Joined: Fri Jun 02, 2017 1:50 pm
Contact:

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

Post 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"
Post Reply

Return to “Not a bug”