Turn double dash (- -) into mdash (—)

I just love long dashes and can’t live without them. Notion automatically turns double dash (--) into m-dash (—), so it would be cool to have in Anytype.

Describe the solution you’d like
Right when you type “--” (not after pressing space or anything), it’s transformed into a —.

Additional context
Also some transformations like -> to → could be handy too.
Space between dashes in the heading of the post shouldn’t be there – but without it forum’s engine turns double dash into n-dash.

Hi Freewalkr,

I like your idea, but I want to point out that the transformation from -> to → is already possible in Anytype in Text blocks. You can insert mdash-es with Option - on macOS or Ctrl(?) - on Linux. Windows seems to be the exception to this rule. Other handy signs can be written this way as well: …π–ºª•¶§≠

Maybe a reference for possible signs and Octicons: patched Nerdfonts

Cheers,

~ Luca

Yeah, thanks, I know about things like alt-codes, but it’s much more convenient and quick to do it just with a double dash.

I haven’t noticed a possibility with an arrow because the transformation happens after you enter a space: haven’t tried doing it. I like the way it is in Notion: just enter a second dash – and you have an m-dash instantly. Not after entering a space, like in Anytype, not after entering the next word, like in MS Word – instantly. This gives you that feeling of workflow speed.

This was implemented :+1:

I am happy that it’s implemented, but it also works in code phrase such us python --version where it also merges into mdash but it should not

@martin-kokos your feedback might be useful here too: Disable markdown in inline code

Actually this is a ligature related problem. Markdown syntax is something different.

Of course, I was just pointing you to that topic so that the devs can keep in mind both problems when debugging the code editor.

This is why I spell it “em-dash”, to avoid conflation with md (markdown).

hi there! how can I disable the m-dash (—) to get back the double dash (–)?

I think there are number of issues with this implementation. For one, Europe uses the em-dash, while the standard for the USA is en-dash. Thus, to accommodate the different conventions, it would be good to be able to select on or the other. The Latex default that – is an en-dash and — is an em-dash is nice, but also not compatible with many of the other behaviors already implemented here.

Honestly, a MUCH better implementation would be to allow user-specified replacement. Since en-dashes require spaces between words and the glyph, while em-dashes require no spaces means that one could specify " – " as an en-dash and “—” as a em-dash. This would require a new instruction for the h-rule, which could be “----”. This would be more compatible with typographical standards.

Please can we have an option to disable this!

I pasted some Sublime Text licenses into Anytype to keep them safe, and all the sets of dashes that mark the start and end of the license got converted into long dashes. I appreciate 2 dashes → 1 long dash may be helpful in some scenarios, but this is not one of them.

Thanks.