Code block "markdown" should be shown verbatim

When using the markdown code formatting the expectation is that any special formatting characters should be printed verbatim.

For example: composed_file_name.c. Instead, in Anytype, the following happens: composedfilename.c which effectively makes the code block formatting unusable. Likewise a * b * (c + d) become: a b (c + d) or something similar.

Please make the ‘’ syntax for the code formatting the highest priority rule, and final. Or exclude any other formatting inside it, whichever is closer to your implementation.

Many thanks.

10 Likes

There is one workaround that I found that works sometimes (which should not be considered as a solution for this bug). It consists of writing the full “code sentence”, then highlight it with the mouse and change its format to “code”. This is less convenient than typing it with the opening ` character, then the sentence, and the closing character.

I 100% agree. I’m having tons of issues when I’m taking notes that contain variables or file names because of this.

I find it particularly problematic with underscores (_).

3 Likes

Same. I am also having lots of issues with underscores. We need better text functionality.

The build of the 15th of Dec says it fixed the issue but it’s still present. Or can someone teach me the way we’re supposed to use this feature? I’ll try to post something later showcasing this.

The markdown characters like “*” and “~” aren’t converted anymore. But the style is still applied. So there was something done, but it isn’t fixed.

1 Like

Thanks for the update, hopefully this is picked up soon

1 Like

I did some tests and all my characters where showed as written, no markdown style conversion for me anymore. Please check this, too. @nelatmani

This is still there, tested with what I had in hand: 0.26.1 Windows.
Check with _, this should repro

Are you copying a whole line line in?
Could you give me some step by step to reproduce?

No, if I copy a line and then transform it to “code” it works as specified here.

What doesn’t work is if you start typing ` then whatever you want to be code, then the closing one. Or if you go manually into a line of code and start adding chars like _ or *.

image

this_is_a_test.c
this_is_a_test_with*stars*.c
line 3 is the source of line 2 copy-pasted which shows the correct behavior.

Again, don’t copy past this; it’ll work. Type it

Thanks

It also repro in new 0.27.0 if anyone’s wondering.

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

1 Like

This issue has been fixed by the Development Team and will be implemented in an upcoming release.