Converting quotes to smart quotes in Discourse posts can lead to problems

Discourse is currently automatically converting any plain quotes that are outside code blocks to smart quotes. This means that if someone forgets, or is not aware, that they should use code blocks for JSON or GREL (or other code) then they end up with non-usable JSON/GREL in their post.

An example of this can be seen in this topic Parsing CrossRef Data.
There is a setting in Discourse which controls this, and which we have the option to turn off (see Smart Quotes in topics? - support - Discourse Meta).

The argument for turning this off seems clear to me - we would avoid the issues that are illustrated by the topic I’ve linked above. However when this comes up in other forums there is usually at least one person arguing the other way - which is to say “just make sure you always use code blocks when you are adding code” (e.g. Straight quotes - #4 by codinghorror - support - Discourse Meta)

Any views/opinions on this?

I prefer code blocks which the setting is called preformatted text and use them. But fine to turn off smart quote setting since this will be more welcoming to new users where the rest of us are unharmed by the change.

Users interacting with this forum only via email won’t be able to properly format their code (over 50% of the message in the Parsing CrossRef Data topics arrived by email for example). Therefore I vote to turn off Smart Quotes.

I use email exclusively and expect the message to arrive in the same form that it leaves my email client. I’m pretty sure I’ve tried a monospaced font for a code block in the past, which didn’t get preserved, but that’s just formatting. I certainly don’t expect character substitutions to occur.

Tom

There seems to be consensus on this. I've modified the relevant setting "enable markdown typographer" to be 'off' - hoping this works as expected and we no longer get these character substitutions

1 Like