Code blocks interrupt numbered lists

Steps to reproduce

Paste this code into a new note, deleting the backslashes on lines 4 and 6:

1. Blah
1. Blah
1. code block
\```
stuff
\```
1. Should be 4

Expected result

The result should be an unbroken numbered list, with “Should be 4” labeled with a 4, as it is the fourth item in the list.

Actual result

While the first three items are labeled correctly as 1. 2. and 3. as expected, the code block itself unexpectedly interrupts the numbering and is labeled as 1.

Screenshot of actual output:
Screen Shot 2021-06-28 at 9.26.13 PM

Screenshot of expected behavior (achieved by manually numbering each entry):
Screen Shot 2021-06-28 at 9.29.01 PM

Environment

  • Operating system: macOS Big Sur version 11.4
  • Obsidian version: v0.12.5

Additional information

This was mentioned in a comment in a thread about a separate issue with code blocks, but not as a bug. This has the potential to be quite frustrating. For instance, it means that if you have a list of code blocks, you will have to manually renumber them every single time you add a new one anywhere except at the end of the list.

This is not a bug at all. It’s the correct behaviour.
You need to indent the code block.

Oh, okay, thanks. That makes sense. Sorry for clogging up the category with an erroneous report.

no problem!

indenting can get very tiresome, in big lists, not to mention Shift + Enter doesnt retain the indentation. So if you are 4 or 5 tabs in… tough luck.