# test heading 1
- Test
- Test
- Test python
```python
print('hello')
```
# test heading 2
- Test
- Test
- Test properties
```properties
test
```
# test heading 3
This could maybe be added to:
Going through the same things here.
test.md (562 Bytes)
And I think itâs different from that post.
I tried switching to Obsidian multiple times, but this has always been the dealbreaker that prevented me from using Obsidian in the first place⌠Even to the point where I implemented some features I was missing from Obsidian on top of a different proprietary Markdown editor by and only for myself.
Damn, looks like this is still an issue that need to be resolved!
I like Obsidian, but this inconvenience annoying.
I mean it works ok in âReading modeâ, but still an issue in âLive modeâ
Hi, just want to add my vote for prioritizing this issue / bug fix. Being unable to nest code blocks inside lists is a major pain point for my workflow.
Hi everyone,
Iâve encountered a couple of issues while using Obsidian related to Markdown code blocks inside lists, and I wanted to share my findings and suggestions:
- Code block breaking list numbering :When inserting a code block inside a list item, the subsequent list numbering is often broken. After some investigation, I found the root cause is that Obsidianâs auto-completion of the closing triple backticks doesnât take indentation into account. It simply inserts a top-level closing without matching the indentation level of the opening inside the list. This misalignment disrupts the Markdown structure and can lead to rendering issuesâespecially if the closing ends up on its own with no content between. A simple fix would be to make the auto-completion logic preserve the same indentation level as the opening ```.
The key points in the above demonstration gif are as followsďź
It can be solved by adding the corresponding space before the ending â â â - Improper rendering of indented code blocks :Currently, code blocks are always rendered at the top level (no indentation), regardless of their actual position within the document. This causes issues with visual alignmentâguidelines and list structures no longer line up properly, and the start and end of the code block arenât visually aligned with the surrounding content. Fixing this would be more complex, as it likely involves changes to the rendering engine to respect indentation levels for block elements.
It can be seen that the starting â â âand the endingâ â 'cannot be aligned, but in fact, there are only the same three Spaces in front of them.Code blocks always start at the beginning and are not inside the list
I simply cannot believe this problem still is there, and it gets even worse. Now I cannot even keep the list number!
Iâm experiencing the same issue in 2025: code blocks are not rendered correctly when using relative indentation in Live Preview mode. However, they display as expected in Reading mode.
Please look into this inconsistencyâthanks!
Steps to reproduce
Indenting a code block under list level higher than 1.
- hello
Did you follow the troubleshooting guide? [Y/N]
Y
Expected result
Expect that the line that is the end of the code block has the indentation class so that the indentation is shown.
Actual result
The class .cm-hmd-list-indent
has been removed in v1.9.1. It works fine on v1.8.10.
Environment
SYSTEM INFO:
Obsidian version: v1.9.1
Installer version: v1.8.9
Operating system: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000 24.5.0
Login status: logged in
Language: en
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
I have such an issue as well, and i have become frustrated to have to manually fight Obsidianâs non-sensical rules which donât match how other software renders markdown. Please fix Obsidianâs markdown parsing.
For this code:
**0**
- 1
- 2 the following code SHOULD be nested under this list item, but it is not because pressing tab doesn't work correctly. if i press tab, it increases with 4 spaces
```kotlin
routing {
route("/tasks") {
get("/byPrio/{prio}") { code }
```
**3**
- 4
- 5 the following code IS nested under this list item bcause i MANUALLY indented every line with 2 spaces
```kotlin
routing {
route("/tasks") {
get("/byPrio/{prio}") { code }
```
**6**
- 7
- 8 there should be no indentation here
```kotlin
routing {
route("/tasks") {
get("/byPrio/{prio}") { code }
```
**9**
Here in discourse, the code is indented correctly:
0
- 1
- 2 the following code SHOULD be nested under this list item, but it is not because pressing tab doesnât work correctly. if i press tab, it increases with 4 spaces
routing { route("/tasks") { get("/byPrio/{prio}") { code }
3
- 4
- 5 the following code IS nested under this list item bcause i MANUALLY indented every line with 2 spaces
routing { route("/tasks") { get("/byPrio/{prio}") { code }
6
- 7
- 8 there should be no indentation here
routing {
route("/tasks") {
get("/byPrio/{prio}") { code }
9
In github it also looks correct:
preview:
cooked:
Or in intelijâs markdown, or discord.
In Obsidian, code is not correctly indented:
I see the following issues:
- obsidian should indent code blocks under the parent list item, if the code blocks are indented at least 2 spaces and at maximum 4 from the âbeginning
-
character of the parentâ - as obsidianâs
Tab
indents with 4 spaces, this should obviously work - both
preview
andreading
should look the same. They donât look the same even in the sandbox vault (different colors and different indentation)