1
\$\begingroup\$
  • What's the actual rule for sub-list nesting?

    • The documented rules say to indent this sublist entry by 4 spaces, but any indentation from 1 to 7 SEEMS to work. Code block formatting works as documented at 8+ spaces. For example, I indented 1 here. So, is this some kind of forgiveness factor? Or is it a bug?

      • Because the grace period seems to end here. To start a sublist at this level, I need to indent another 4 to 10 spaces for 5 to 11 total, and the code block kicks in at 12+, as expected for this nesting level. I indented by 5 total, here.

        • Here things continue predictably, nesting starts at another 4 to 10 spaces for 9 to 15 total, code block starts at 16+. In fact, alternatively, at this point, using a total indentation < 9 causes this item to adjust itself to the nesting level of whichever previous line was indented at or just short of that indentation. Level 1 for no indent, level 2 for indents 1-4, level 3 for indents 5-8, level 4 for indents 9-15. Kinda nice, I guess, even if a little unexpected, and possibly inconsistent.
  • Because strangeness enters in when the documented spacing of 4 is exceeded.

    • Here I went for a 7 space indent, the max supported before code block kicks in.

      • Here, I get a sublist for another 1 to 4 spaces for 8 to 11 total and the code block formatting kicks in at 12+ spaces. That's to be expected. BUT I also get a sublist if I REDUCE indentation down to 1 to 6 spaces. Starting a sublist by reducing indentation is not only counter-intuitive, but it leads to chaotic behavior for successive list item indentations. For example, creating this sublist by REDUCING indentation leaves the following options for its successor item:

        • Level 1 for no indent, level 2 for indent 7 (apparently because it exactly aligns), level 3 for an indent of 1-6 (?) or 8, level 4 (new sublist) for indent of 9-15. So most cases of reduced indentation here effectively keep the current level rather than starting a sublist as it did before.

At some point, (after another creative selection of indentation level), I've seen the chaos creep over into the usually rock-steady 4-space-per-nesting code block trigger, disabling it and causing excessive indentation to be ignored instead and the text that follows to be appended to the previous line.

\$\endgroup\$
  • 3
    \$\begingroup\$ I've always stuck to the rules stated in the markdown spec, but you're welcome to try formatting quirks out in our sandbox. \$\endgroup\$ – Jarrod Dixon Jan 9 '12 at 16:05

You must log in to answer this question.

Browse other questions tagged .