I suspect this happens because the JS code doesn’t parse a paragraph of text in character-by-character left-to-right order, but instead probably does some kind of pattern-matching on the entire text at once.
(No, Discourse, my topic is not similar to “Are there any Roman amphitheatres that have seen constant use?”)
In the example paragraph I wrote above, there were examples of (c) with back-slash before both parentheses and it still appeared as (c). Here is one: (c). How about backslash only before the second parenthesis, like this: (c)? In other attempts I’ve made to investigate this, I couldn’t get consistent results, at least not according to any straightforward rule that I could see.
The case of (c) in particular comes up a lot when people try to make a list of items
(a) like this one and
(b) like this one too and
(c) We still miss you Opal and
(d) also like this one,
and it’s really tricky (if possible at all) to make the third item appear correctly.
I mentioned it in another thread, but this seems like a good time to suggest it again. IMHO, there should be some special character or sequence of characters, that, when typed, will trigger the software to parse whatever immediately follows it as code or a special character or whatever. It should not be the case that a special character or sequence of characters is used similarly to noparse tags.
To me, the way it currently is, would be like if MS Word would automatically underline any word that started with the letter u, unless I explicitly told it not to. So if I wanted to write the word underline, I’d have to write \underline, so I don’t get nderline instead.
In other words, the default should be that what I type is what appears in my post.
What Joey_P says would really have been the better way, but it’s way too late for that now.
Discourse actually implements a hodge-podge of subsets of three different markup styles: vBcode, Markdown, and bare-naked HTML. (I still use vBcode because I know it the best.)
With a massive base of existing posts (and that’s on SDMB alone, let alone on all the other Discourse boards), I can’t imagine how that can be changed now.
But compare with post #3 above. See the problem there? Here it is again, abbreviated: There are problems with (c):
(c) Both parentheses have backslashes on this line.
Let me teach you another trick, just because I like y’all:
https://boards.straightdope.com/raw/923748/8
that says you posted
But compare with post #3 above. See the problem there? Here it is again, abbreviated: There are problems with (c):
\(c\) Both parentheses have backslashes on this line.
So if the line immediately above contains a non-escaped version, the escaped version directly underneath dosn’t work? Yes, certainly a bug, but it’s such a narrow range of problem that I even wonder how it was discovered??
OK let me be clear that I am on board with this being a bug for sure, but is this really causing problems in actual posts? I feel like I’m being dragged through the streets of hypothetical-theoretical-potential-problem-town.
I don’t recall the specific posts where I’ve seen it, but I’ve definitely seen it several times, including in posts I’ve made and in posts that others have made.
It’s noticeable in making lists where (c) appears as a copyright symbol instead. But in what cases does this happen? Since it might be a bit uncommon for it to appear twice in one paragraph (except of course in paragraphs where we’re talking about copyright symbols), I’m thinking there must be other cases that cause this. How about, when I see it again, I’ll let you know. It’s not altogether uncommon.
It is a very fine bug. I respect the effort that went into finding it and reporting it. I’m also impressed since I’ve never actually seen this one reported before, and it’s probably been around since the very first days of Discourse (that’d be 2013).
But we also do try to prioritize fixing things that have the most impact on real world usage, because like all open source software there is a lot of breakage… figurative… conceptual… and actual.
We also strive to expend most of our effort building new stuff, new features, and enhancements. You can see the roadmap at releases - Discourse Meta
It’s also because I’m a (retired) programmer, and I had a long history of finding and sometimes precisely diagnosing (often subtle) bugs in other peoples’ programs without ever even seeing their source code.