Nested and indented "ini" code blocks break formatting in editor

Steps to reproduce

Given the following content:

```ini
[section]
key=value
```
- A list item with an indented css block
  ```css
  .foo {
    color: blue;
  }
  ```
- A list item with an indented ini block
  ```ini
  [section]
  key=value
  ```
- Another list item that gets the wrong formatting in the editor

The editor (in both live preview and source modes) renders the third list item incorrectly:

Expected result

The syntax highlighting for the ini code block should end and the third list item should be displayed as plain text (as the second list item does)

Actual result

Environment

  • Operating system: macOS 12.2
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v0.14.2
    Installer version: v0.13.31
    Operating system: Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 21.3.0
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Safe mode: on

RECOMMENDATIONS:
none


Additional information

The document renders in reading view just fine. This only occurs in the editor in both live preview and source modes.

4 Likes

Still happen on 1.3.7 (Installer 1.1.16), I use toml and bash instead for now :frowning:

1 Like