Markdown rendering: All text treated as code after codeblock in live preview

Steps to reproduce

Put the markdown in the following pastebin to a new file:

Expected result

In live preview, all text inside code blocks are rendered as code, all text outside code blocks are rendered as markdown text.

Actual result

In live preview, after the second code block, all text, even after ```s, are treated as code.

Environment

  • Operating system: Linux (openSUSE Tumbleweed), Obsidian installed via AppImage
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v1.0.0
    Installer version: v0.15.9
    Operating system: #1 SMP PREEMPT_DYNAMIC Thu Sep 8 10:26:47 UTC 2022 (0330383) 5.19.8-1-default
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Restricted mode: on

RECOMMENDATIONS:
none


Additional information

  • This bug only occur in live preview
  • This bug only occur on codeblocks after the specific bullet list layout. In the example, it doesn’t occur after the 1st codeblock, only the 2nd
  • This bug only occur when the language alias of the codeblock is one letter, so it occurs with C, D, R… but not Python(py), Javascript(js)…
  • This bug only occur after upgrading to v1.0

thanks

This seems to happen for me as well when the code-block contains auto-parsed links. For example [email protected]

I was about to open an issue for this and found this bug already reported (no duplicates whew :slight_smile:)
You can find the GIF showing the bug attached
obsidian-issue

As you can see the issue disappears in View mode and only occurs in the Live preview mode. I was hoping to get into the code base myself and found out that Obsidian is not open-source :frowning: