Spaces on not converted well when using {{code language="none"}}

When the wiki tag {{code language=“none”}} is used for blocks of code, the spaces at the beginning of a line in this code are converted to something that cannot be interpreted by Linux. Other spaces are official UTF8 spaces.

When the tag {{code language=“xml”}} is used for these blocks of code, all spaces are properly converted to spaces.

Having said that, I propose a solution for preventing issues in the future. My proposal is a button for code (universal) that styles the code in a basic way, without colors. This way all code blocks on will look the same and do not visually distract from the warning, info or error blocks. This way the important warning, info or error blocks will really pop out. Also, don’t forget to emphasize on the contrast with regard to these warning, info or error blocks. The contrast now is too low, which is why a reader disregards the message more easily.

I hope I have been of any help, thanks for all your work on this great piece of software.


Correction: This issue is not only the case when using {{code language=“none”}} it is also the case when using {{code language=“xml”}}. I have not been able to try other types of languages.

So the result is that when people copy/paste pieces of code from your wiki into nano on their system, this code will not be interpreted as is intended. It will fail.

I have looked up the character code of this ‘space’ and it seems that it is not a normal space:

  • A normal space: 0x20 (hexidecimal character code), or just a normal space.
  • The space in the {{code}} block: 0xa0 (hexadecimal character code), or a non-breaking space character or ‘ ’.