GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Small bug - backslash needs to be double written


#1

I noticed that backslash ("\") when is type inside quotation mark, must be typed double if I want to see it on forum. Small bug but maybe there is fix/update.


#2

That isn't a bug; the backslash is an escape character in Discourse.

If you click Editing & Formatting Tips above the post editor, it's one of the first things it discusses:


#3

I know how double backslashes works but in forum imo it's a bug. It's not big problem to make code that displays everything as I type. Escape characters should be added by script after post was created for correct displaying text later (when post is read from database and display on screen). Double backslashes are used in php (and maybe in some other programming languages), but I see no sense to use them in posts. It's not programmer's editor, it's a forum.

Or maybe there is any example when using that double backslashes gives any advantage to user of this forum?


#4

It lets you escape other characters, e.g. you can type \`test\` so get `test` without it turning into test.

If you really think it is wrong and want to argue about it, you can talk to the Discourse developers here.


#5

If this forum would be my choice for my website - I would certainly do it.


#6

If you think about how markup formatting works, you'll see there's a reason for it needing an escape character. Without an escape character, it becomes impossible to produce certain strings (including ones for talking about how to use markup itself!).

It is unfortunate that Windows chose backslash as a path separator when so many other things in the world use backslash as an escape character, but it's too late to change either now.

Markup formatting is used in lots of other places, e.g. Reddit, where I think the same rules apply for backslashes.

So I am not going to complain to them, as I don't think anything is wrong or broken.