Indented checkboxes don't render when not next to other ol or ul items

To reproduce:

Obsidian 0.9.20

In a blank note or section of a note that doesn’t have listitems type some leading spaces (e.g. 4) leading spaces followed by - and [ ] ( - [ ], or - [x]

observe the obsidian rendering is of the plain text.

if the above text is located below a list item it renders properly as a checkbox. If the first checkbox is not indented it (and the checkboxes that follow) do render properly.

Here is some sample markdown that renders inconsistently:

**Bullets**
  * Level 1
  * Level 1
    * Level 2
  * Level 1


    - [ ] hello world


**Todos**
    - [ ] Level 1
    - [ ] Level 1
      - [ ] Level 2
      - [ ] Level 2
        - [ ] Level 3
          - [ ] Level 4
            - [ ] Level 5
          - [ ] Level 4
          - [ ] Level 4
        - [ ] Level 3
          - [ ] Level 4
      - [ ] Level 2
    - [ ] Level 1
    - [ ] Level 1


- [ ] level 0
    - [ ] level 1

This is not a bug, it’s more about the markdown spec. If you unindent the bullets after the **Todos**, it should work:

Moving to #help

I haven’t seen anything in the spec about needing the first checkbox to be un-indented in order for others to work. I would think the checkbox would render regardless of spaces before - [ ]

It is an inconsistency for sure and certainly an inconvenience because notes don’t render well with odd indents if there are other items nearby that are indented. Perhaps consider this a feature request rather than help if it isn’t a rendering-engine bug.

It’s the same as for lists I believe. The first item in the list must have a parent that is unindented

Alright, I see in the spec a first list item can be indented by up to three spaces. Indents of 8 spaces make a codeblock. This accounts for rendering oddities I see. I am writing an Evernote exporter, so I’m trying for the best balance of three things:

  • Plain text readability
  • Markdown > html rendering
  • Markdown > render behavior

Most things need only the balance of the first two. Checkboxes are a special case requiring the third since the behavior of a checked parent is to “mark through” its children, which isn’t the case in Evernote where each checkbox stands alone (there is no parent-child behavior).

I’m facing a similar issue as mentioned by the OP. below are the screenshots for reference:

If the root parent is not a bullet, then the preview is not correct:

But as soon as I convert the root to a bullet, it works properly: