Hashes (#) in python code blocks parsed as headings

Steps to reproduce

When entering comments with “#” using python code blocks.

Expected result

The outline does not show my comment (what comes after the # in the code block)

Actual result

The outline shows my comment (what comes after the # in the code block)


  • Operating system: macOS Monterey 12.5.1
  • Debug info:SYSTEM INFO:
    Obsidian version: v0.15.9
    Installer version: v0.14.15
    Operating system: Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:35 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T8101 21.6.0
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: light
    Community theme: Minimal
    Snippets enabled: 0
    Restricted mode: off
    Plugins installed: 18
    Plugins enabled: 4
    1: Minimal Theme Settings v5.3.2
    2: Hider v1.1.1
    3: Typewriter Scroll v0.2.2
    4: Style Settings v0.4.10

Additional information

This did not happen with my C notes (which included header files) and other python notes. In fact the problem only exists in that one code block, which makes it all the more strange. I’ve tried restarting Obsidian and reopening that note.

The issue was solved when I separated the (rather large) code block into several small code blocks :thinking:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.