IMO, if user forgets to close such tag (be it bold, italic, underline, size or color), Unity should close it automatically.
Because with current behavior, making parser for a jRPG-like message system complete with coloring and so on is a nightmare. Here’s my problem: For dialogue in my game, I’ve adopted RPG Maker-like “pseudo escape sequences”, with following codes:
\c[newcolor] - changes the color from now on
\p[frames] - pauses message for frames frames
! - pauses message until user preses action key
\d[delay] - sets delay between each character (game outputs message letter by letter, if it is set to 0, it’ll output it instantly)
\ - displays ""
Plus one for internal use that makes interpreter output several characters at once (so it for example output whole formatting tag).
See, if unity wouldn’t be so strict about closing tags, all I’d have to do would be to replace “\c[newcolor]” to “<color=newcolor>” and add in front “skipping” (internal one) code in front of it so it would output whole tag at once. Unfortunately I can’t, because unity would just display (for example) “It’s winter! <color=green>now it’s spring!” verbatim instead of detecting the tag and closing it.
I can’t replace “\c[newcolor]” to “<color=newcolor>” either, because following:
"It's winter! </color><color=green>now it's spring!</color><color=yellow>And now it's autumn."
as:
It’s winter! now it’s spring!<color=yellow>And now it’s autumn.
So stop being so strict about text formatting!