Live Preview: Better support of code blocks in lists

Steps to reproduce

In a note, enter the following:

* Here is a list item

  ```text
  Here is a code block within that list item
  ```

Expected result

I’d expect to see the code block rendered in the editor in a way that makes it clear the block is nested inside in the list, i.e. in a manner consistent with the preview view, which gets this right.

Actual result

The code block is rendered with a background that isn’t indented, making it appear that the code block is a top-level item which happens to contain code where every line is indented.

Screenshot:

Environment

  • Operating system: MacOS 10.14.6
  • Obsidian version: 0.6.4
  • Using custom CSS: no

Additional information

Here’s a screenshot of the preview view getting the rendering right:

Here’s a similar bug report: Syntax highlighting is broken for block quotes in bulleted lists — but I think it’s probably a different case.