- Lists are nice
Because they help bringing order and readability into a post.
- They may also be titles
Which helps with quickly skimming answers, too.
However,
The intendation is also needed for code blocks - but this block here was intendated with CTRL+k, which does not automatically adjust for the need for
7 spaces before being formatted as code block, i.e. I added 3 more spaces here. One may break the need for 7 spaces with a horizontal line
but this interrupts the numbered item/ bullet point and it is unclear
whether the code is part of the bullet point or not.
- Backtics
do not work as they disregard linebreaks (this block has two of them).
- So the question is:
Is there a more elegant way to break out of the intendation for lists when introducing a code block?
I prefer having any code block not intendated despite being part of a list but ensure that it is clear that the code block is part of the current list item.
<!-- -->
is used as suggested by fra-san OR if there is prepending, non-intented text. Only if there is no prepenting text or this text is also intented, the code block breaks. But I agree, CRTL+k should be smarter in such cases.