Double dash in code is replaced with m-dash

WHAT IS THE BUG

Double dashes in between code delimiters (example) are replaced by m-dash

HOW TO REPRODUCE IT

Go to editor, create a code section, type some dashes.

THE EXPECTED BEHAVIOR

Double dashes are left as is

SYSTEM INFORMATION

Latest Anytype on lastest Mac

This report has been added to our issue tracker and received by the Development Team.

Just created an account here to report this issue as well. This character replacement is probably fine for normal text, but it sadly also happens when formatting inline code with markdown.

Hey guys,

I also just signed up to the community to see if anyone else had experienced this behavior. It still seems to be an unsolved item.

Any idea how to work around this?

Best regards,

quicky

@quicky Just checked and doesn’t seem to work like this, could you please make a video or a more detailed explanation?

The issue was fixed for links, but double dash changing into — in text blocks is by design.
Please check Ability to prevent markdown symbols from changing formatting if you would us to implement a way to disable this.

Sorry, but I have to ask: What does “is by design” actually mean? I also work with other Markdown tools that don’t change the actual user content without asking. Because that’s a key point: In this case, it’s not just the appearance of the text that’s being altered - a character is actually being replaced with a completely different one. For power users, programmers, and IT admins, this means tons of broken code snippets. Having to always prep the text to be inserted with escape characters first is unreasonable in the long run, especially with longer code passages. Anytype should at least provide an optional setting so users can decide for themselves whether the double dashes can be replaced or not.