1
$\begingroup$

I usually present code by indenting lines with four spaces or using the respective button in the editing menu.

line_of = "code"
another = "line"

However, after a numbered or bullet list with

  1. some item
  2. another item

    code_is_formatted = False behaviour = "INCONSISTENT"

Just after adding some other item.

code_indentation = "works"

Is this a bug or am I using the markdown wrong?

$\endgroup$
  • 1
    $\begingroup$ You just need another 4 indents (so a total of 8). There is mention of this here. Seems that the markdown specification isn't clear as to what should happen in this specific case. For some reason adding another 4 spaces solves this. $\endgroup$ – Ray Mairlot May 5 '18 at 10:16
  • $\begingroup$ @RayMairlot But then the codeblock is indented as if it were part of the list. What if I want to end the list and add the code block? $\endgroup$ – Leander May 5 '18 at 10:30
  • 2
    $\begingroup$ More information here. You can place an empty line after the bullet point then <!--> then another empty line and then code. $\endgroup$ – Ray Mairlot May 5 '18 at 10:39
  • $\begingroup$ This is a well known problem which would be fixed by the addition of fenced code blocks, but there's no information on when or if those are to be implemented. $\endgroup$ – gandalf3 May 5 '18 at 20:05

You must log in to answer this question.

Browse other questions tagged .