Make </br> work in RichText markup as an alias for <br/>

I keep forgetting that for the line break tag the slash is at the end instead of the beginning. <br> is the only tag like this.

There’s probably some theory around how the br tag is its own terminator or something, but it would save me a fair amount of re-editing my NPC dialogs if the other would just work also.

Just an idea.

16 Likes

</tag> is the form of a closing tag, e.g. <b>bold text</b>.
<tag [attributes]/> is the form of an opening tag with nothing inside, equivalent to <tag [attributes]></tag>.

Making </br> work the same as <br/> is inconsistent with XML syntax, and ambiguous for strings which would put a </br> inside of a <br> label (it could close the label or be part of it). Allowing </br> isn’t a good solution, maybe &n; would be better, or just using the already valid &#10; (which is incredibly expressive).

4 Likes

</br> is not valid XML and we use an actual XML parser for the rich text, so standalone </br> won’t parse.

6 Likes

Does xml support the newline character? Because it would be even better not to use markup for line breaks. My first idea was bad.

It would be cool to be able to type multiline text into the .Text property of a RichText-enabled GUI widget in Studio’s property explorer.

3 Likes

Yeah newline characters should just work, except for the part where you can’t easily enter them through the .Text property in the grid.

image

4 Likes