--을 en dash로 매핑하는 것을 "감시 단어"(또는 다른 방법)으로 "수정"할 수 있을까요?

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.

Any other ideas?

2개의 좋아요

You could turn it off using the enable_markdown_typographer admin setting? It would stop the → and ™ etc ones as well, but it seems the simplest way.

1개의 좋아요

I like the other ones. This one is just Wrong™.

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. :slight_smile:


  1. again, for a pedantic version of “break”, but, you know, still ↩︎

  2. that is, the generally-correct “” instead of too-short “”? ↩︎

1개의 좋아요

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… :thinking:

I really don’t have any opinion. I’m claiming quite few see the difference or care of it.

some cleaned off topic’ish…

All I know I like → ™ etc but creating tables is a quite pain in the tender place because - - will change to —

I edited that post because I got advice that single - is enough. I didn’t know that — every day something new.

Interesting! Today I Learned!

Per-language might be interesting – although I’d settle for a way to change it. (https://www.npmjs.com/package/markdown-it-replacements)

1개의 좋아요

오늘, 해당 옵션의 도움말 텍스트가 나를 조롱하고 있다는 사실을 깨달았습니다. 다음과 같이 적혀 있습니다:

텍스트의 가독성을 높이기 위해 타이포그래피 규칙을 적용합니다: 직선 따옴표 '를 곡선 따옴표 ’로, (tm)를 기호로, --를 em dash(–)로 대체합니다 등

그것은 _em dash_라고 쓰고 있습니다.

하지만, 사랑하는 친구들이여, _그것은 en dash_입니다.

아, 참으로 참담한 일이로다!

4개의 좋아요

여기서 모든 사람을 만족시키는 방법은 정말로 없습니다.

호기심에 궁금한 점이 있는데…

[root@fedora-39 /]# grep DASH /usr/share/X11/locale/en_US.UTF-8/Compose 
<Multi_key> <minus> <minus> <period>    : "–"	U2013 # EN DASH
<Multi_key> <minus> <minus> <minus>     : "—"	U2014 # EM DASH

Fedora 자체도 두 개의 대시 → (엔 대시), 세 개의 대시 → (엠 대시)라고 동의하는 것 같습니다 :grin:

2개의 좋아요