Can I “fix” the mapping of – to en dash with “Watched Words” (or in some other way)?
Discourse replaces -- with an en dash (–), which mattdm finds irritating, as most people intend to use an em dash in writing. mattdm suggests that this is a bug that should be fixed globally but acknowledges it might be a pedantic issue.
JammmyDodger proposes disabling the enable_markdown_typographer admin setting, which would also stop other typographic replacements. However, mattdm likes the other replacements and is only concerned with this specific issue.
mattdm reiterates the issue and proposes amending the Markdown Typographer feature to render -- as an em dash instead of an en dash. gerhard points out that the preferred usage of en dash and em dash varies by language and country, making a site setting or automatic switching based on the user’s interface language a possible solution.
Jagster thinks few people notice or care about the difference. mattdm acknowledges the varying usage and would settle for a way to change it. superrathie notes that there is no way to please everyone and shares Fedora’s settings, which agree with the current Discourse behavior.
For probably perfectly-well intended reasons, Discourse replaces -- with –, an en dash, and --- with —, an em dash.
I find this a minor irritation, because when people use -- in writing in email (or on the olden days in a typewriter), they almost always mean to use an em dash. En dash is only used in several fairly obscure cases, like range of numbers or times (“The party goes from 7–9 pm”), scores or voting results (“She won in a landslide, 78–22!”), or occasionally for complex adjectives (“World War I–era”). All of these use cases are represented by a single- character on a typewriter or normal keyboard, and most people’s writings.
So basically, what Discourse does is almost always wrong (for a highly-pedantic value of “wrong”).
I feel like suggesting that this is a bug that should be fixed globally is probably tilting at windmills, so I’m wondering how to configure my site locally so it at least that doesn’t bug me. I thought about using the word replacement feature, but that seems to also mess up cases where one uses --------- or similar for horizontal rules or headings in Markdown.
Okay, this one still bugs me. And I realized that it’s not just on my site.
Part of the appeal of Markdown — even over some other lightweight text markup languages — is that normal ascii-text conventions remain, and you don’t usually have to do anything weird to make a plain-text paragraph render as it should. This breaks that.[1]
So, let me ask a slightly different thing. Would y’all be open to amending the Markdown Typographer feature as used in Discourse to render -- to em dash instead of en dash? [2]
Thank you for considering.
again, for a pedantic version of “break”, but, you know, still↩︎
that is, the generally-correct “—” instead of too-short “–”? ↩︎
Hmm, we can’t simply change the rule, because the preferred usage of en dash and em dash seems to be different depending on your language and country. In German we definitely want en dash when we write -- and I think it might be the same in French and British English, at least that’s my impression after skimming Dash - Wikipedia.
Would a site setting be enough? Should Discourse automatically switch between en dash and em dash based on the user’s interface language? I’m not sure what the best solution would be…