Rendering of code blocks

I am not sure if this is actually a bug. I just wanted to misuse the code block for a legal case exercise. However, when I write the text, it is displayed correctly, but when I click on ‘Finish’, a bar appears below the text because the automatic intentation does not work.

Hi @isaiur,

The behaviour you have posted is indeed the correct behaviour of a code block (so I’m moving this topic to Community Support).

Code blocks only respect new lines (and won’t automatically wrap), because lines and indentation needs to be respected so code can be interpreted, compiled and read. Mis-using a code block like you have done, requires you to manually force line breaks by pressing enter at the end of each line. But then this won’t work for all screen sizes / card widths. My suggestion is to use Blockquotes instead, something like the following:

1 Like

This makes totally sense, thank you!