Can not indent code block without a list

What have I searched

this uses a list to indent a code block.
but I want to indent code block without list…! is this possible?
is this intended behavior?

Steps to reproduce

Did you follow the troubleshooting guide? Y

Expected result

I want code block to be indented without a list

Actual result

it looses syntax highlight when I indent it


Obsidian version: v1.3.7
Installer version: v1.3.5
Operating system: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 22.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
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Obsidian Git v2.20.7

Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Indentation by itself marks a block as code. So if you indent a fenced code block, you’re marking the backticks as code too.

If you want all code blocks to be indented more, you can use a CSS snippet to do that.

If you only want to indent some code blocks, you’ll need to explain in more detail what you’re trying to accomplish.

If you want to only indent in editing view, you can indent by up to 3 spaces without triggering a code block. The indentation will not appear in reading view.

Also, of course, indentation is preserved within code blocks.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.