A switch that disables code blocks by indenting

I’ve spoken with the community about this and they suggested I make a request here.

For years I’ve been using apps that “use Markdown” like Bear and Ulysses. So I would often tab underneath a header for typing because I visually like to indent different topics. Well, turns out that those apps were really using “Markdown flavors”. It was like Markdown lite.

So now that I’m using Obsidian that uses the full Markdown specs, when I try and indent underneath a header, I get a code block! That technically is correct, but I hate it! I can’t write the way I normally like to write.

I would love a simple switch that says something along the lines of “disable code blocks by indenting” or something to that effect. I would still be able to do a code block using the three ticks.

Please, someone do this! This would be a huge help to how I want to use Obsidian! Thanks!

11 Likes

+1
I would love a switch to disable code blocks by indenting.
Pasting from other sources causes unintended codeblocks all the time because of indentations.

3 Likes

i also would like this because some of the plugins I use cause some of the list items to be interpreted as an indentation instead of a list item

If you exclusively use Live Preview, this CSS snippet should do the trick.

.cm-s-obsidian .cm-hmd-indented-code {
	color: unset;
	background-color: unset;
	font-size: unset;
	vertical-align: unset;
	font-family: unset;
}
1 Like