Typographer pain

Within Discourse there is an automatic typographer module, so that when I type, for example, .. I get instead … (ellipsis) and when I type -- I get instead – (en dash) and who knows what other automatic supposedly helpful substitutions are made.

These are particularly unhelpful in a forum that has frequent references to shell commands, and may even be dangerous if commands are cut-and-pasted out of a forum into a shell window.

I think this same module also provides so-called smartquote functionality, and again that is almost certainly unhelpful with shell commands.

It is true that all of this is disabled for text that appears inside backquotes (or if the user judiciously uses backslash escapes). However not every user knows that that is necessary.

It seems that it is possible to disable the markdown typographer by configuration but that it is all-or-none. That is, I don’t think it is possible to have the markdown typographer enabled but disable all of the above problematic substitutions, leaving only the harmless or useful substitutions.

I move therefore that the markdown typographer be disabled.



I disagree.

As you point out, it’s relatively easy to escape and there are some advantages to Discourse Markdown.

See the hidden list, below
  1. You can have more interesting formatting.
  2. You can have relevant emojis: :jack_o_lantern:
  3. And you can still have pre-formatted blocks:

from flask import Flask
app = Flask(__name__)

def hello():
    return 'Hello World!'

Not only that, but I think if you disabled the typographer, you could no longer upload pictures/files. Who knows when a diagram of common probability distributions will be relevant:

I’ve seen this used frequently in the forums.


To be clear, the proposal is not to disable markdown itself, just to disable the markdown typographer.

I do not really see this as an issue.