Code fences inside check lists do not render properly

Steps to to reproduce

Create the following check list in Obsidian:

- [ ] First do this:
  ```sh
  gzip file1
  gzip file2
  ```
- [ ] Then do this:
  ```sh
  cp file1 dir1
  cp file2 dir2
  ```

Then, switch to preview mode.

Expected result

The code fences should render like in Typora, or like here in Discourse:

  • [ ] First do this:
    gzip file1
    gzip file2
    
  • [ ] Then do this:
    cp file1 dir1
    cp file2 dir2
    

Actual result

The first lines of the code fences are shifted to the left, their first character is not visible.

Environment

  • Windows 10
  • Obsidian 0.9.11

I believe this is related to this other bug

Will be fixed in 0.9.12

1 Like