Generic parameters disappear in text

#1

When people write things like “Array<Int>” in a post, it comes out looking like “Array”. That is, the generic component disappears. To the best of my memory, this did not used to happen. I think it started with the recent forum update.

Of course there are workarounds—we can use backticks (Array<Int>) or backslashes (Array\<Int>) to prevent the generics from disappearing. But from a usability perspective, that should not be necessary. Text should appear as written, unless it contains valid markup tags.

Discourse appears to treat the text between “<” and “>” as an HTML tag, even though it isn’t. And when it isn’t, it should not affect the markup. It should appear verbatim as part of the content of the post, because that’s what it is.

People posting here should not have to contend with this aggressive and automatic alteration of their posts. Anything that isn’t valid HTML should not be rendered as if it were.

(Jordan Rose) #2

I have to disagree with this one. Discourse should not be hardcoding a list of valid HTML tags (unless it's deliberately enforcing a limited subset of HTML). It's unfortunate that the syntax collides, but that's true about any syntax collision.

1 Like
#3

I hope it's deliberately enforcing a limited subset of HTML.