Bullet points captured by code fence when indented

Steps to reproduce

#some code
- A bullet point that I want indented by one level

Expected result

I expect to see the code syntax highlighting end completely after the second ```

Actual result

On indenting a bullet point (-) one or more levels, the bullet point is captured by the syntax highlighting of the code fence.

Environment

  • Operating system: Linux Mint
  • Obsidian version: v0.6.5
  • Using custom CSS: No

Additional information

This happens with ANY text indented with a blank line above it.
If you type any character on the blank line (except space) the text below returns to normal.

Obsidian_20-06-08-37_248x180

Obsidian_20-06-08-38_389x239

This is not a bug. It’s the markdown syntax.

Black line above + Indented text = code block

https://www.markdownguide.org/basic-syntax/#code-blocks

1 Like

Hi, I came across this today with the same issue.

With the understanding that I can’t just ignore parts of markdown I don’t like, I wish I could ignore this part. I use lists with line breaks in them all the time, and an indent seems like a very frequently used character to start something as infrequently used a code block, which has an entirely separate syntax for it. I’ll take it up with Gruber I guess.

In the meantime, are there any workarounds for this? The hacky way I thought of is to just change the CSS to prevent rendering code blocks entirely. It would be nice if there was an option in the future to render anything within a collapsable indented list as part of that list though.

Thanks!

3 Likes