I fully agree.
Codeblocks not being rendered correctly in lists is MOST DEFINITELY a bug.
This is the single feature that should be at the topmost priority. Why is this not being fixed??
The top feature? Come on, take a look at all the feature requests and tell me this is more important than the hundreds of other FRs.
I believe better markdown rendering is fundamental as compared to other features. If this is done, it would be much easier to edit quotes/codes/tables at a bullet (list) level without having to worry about indentation. Currently Typora has a really good markdown experience. This is where obsidian should catch up. If the markdown live editor experience is great, then any other feature would certainly benefit.
I also think itâs more a bug than a feature request.
Maybe not the top bug. But still something to consider.
There are quite a lot of developers amongst Obsidian users, including me.
Also, it may be quite simple to fix? Isnât it?
Unfortunately, Itâs not quite a simple fix. There are several parts of Live Preview that arenât just buggy but flatout not done (just search âLive Preview Supportâ ).
I can move it to Bug Reports if it makes you feel better but it wont make this get done any faster. Right now, the attention is elsewhere and these issues will likely be addressed in batch next time LP is reworked. Sorry!
I wouldnât be as passionate(or perhaps, dramatic) as some people are about this, but I see where theyâre coming from. The lack of this feature/bug-fix makes an outliner-loving developerâs workflow essentially impossible in Obsidian.
Or, maybe unexpectedly, this also excudes workflows that depend on âspecial-block-in-a-list-styleâ functions. Callouts or block quotes, for example, fall prey to the same sort of malfunction. This means plugins that rely on code blocks, like Dataview or Dynamic TOC, also donât work in lists. If this were added/fixed, itâd open a whole host of new opportunities for extensibility in lists.
As a developer myself, I understand the shift away from active LP developmentâitâs exhausting to have to tinker with one thing without end. That said, Iâm glad this is still somewhere further down on the docket because itâd be a valuable piece of a more comprehensive Obsidian markdown experience.
I do think this should be under Bug Reports, simply because when I first tried it, I was thinking âokay, this 'oughta workâ, rather than âI wonder if this worksâ. It feels like something youâd expect to be there, yet it isnât actually there. I think thatâs closer to a bug than a feature request, but it probably just comes down to your opinion on semantics.
+1 this is an important issue to fix
+1 ! Poor WYSIWYG rendering is why I hesitate to migrate from LogSeq to Obsidian entirely
+1! thisâs important
+1
this issue is the only bad point
+1
Actually, Iâm pulling my hairs off my head trying to put CodeBlock into list.
Itâs bugged as hell.
Took this app to write faster and better notes with the markdown support.
Actually here Iâm loosing Hours trying to fix the messâŚ
Edit 1 : I Found a temporary fix, gonna smoke another cigarette and then post it in Edit 2.
Not sure why Obsidianâs editor mode struggles with embedded markdown in any kind of indented md, but this definitely feels inline with the issues that callouts are having
Edit 3 : This is the behavior I have in screenshots and a ´fix´ for CodeBlock in Lists.
Notes that I am working on the Intel Mac version on Ventura 13.1.
And a reply to my post to say, if your trying to copy/past in CodeBlock that are in list, your in for some other troubles⌠(at least I am).
No matter if you command+v or command+shift+v.
I just quit trying to use CodeBlock in List as for now, the behavior made me lose 8 hours of my time.
Hello. For those still struggling with the behavior of codeBlock in list, I found this post and it helped me a lot to incorporate correctly.
Also what helped me to prevent wonky behavior when you copy/paste code in a codeBlock that is in a list is to activate ´Scroll long lines´option in Style Setting plugins.
That way you can control the behavior in editing more without weird display behavior.
This imply you are using the Minimal Theme Settings plugin + its Style Setting.
The current state of the code blocks in live View is pretty bad.
As a coder who stores a lot of code snippets in my note, I am really questioning if obsidian is the right software for this
Does somebody know if there is currently development ongoing or planned to fix this situation?
This is an intolerable error, please be sure to fix it asapâŚ
This is indeed a serious bug that deserves its reputation as the top bug report of all time. Come on guys, time to send it to the graveyard!
My cumbersome workaround is keeping code blocks stashed at the bottom of a file, then copy-pasting block embeds into a list.
This way, I can properly indent code blocks. But this is rather time-consuming, and it is easy to get lost as the page gets longer.
It would be great if this bug could be addressed so that Obsidian could reach its full outlining potential.
Summary
I also care about this issue, since I canât easily render nested code blocks while editing in Obsidian. Indenting code blocks in lists is such a useful technique for technical documentation, since you can group and organize complex commands or code snippetsâaids readability.
For example, consider the following Reboot your server illustrative procedure:
Reboot your server
The following procedure describes how to reboot yourserver web server.
-
Connect to your server.
ssh yourserver
Note: If you leave out your username, then the
ssh
command defaults to your current usernameâthe one in yourUSER
environment variable. -
Reboot your server.
reboot
Consider the following details:
- Insight: Rebooting your server applies industry standard troubleshooting technique.
- Gotcha: If you reboot your server during business hours, then all your apps will go downâmajor bummer.
Markdown reference
I easily (itâs not really easy since I needed to manually type 3 spaces (a pattern I haphazard
realized through trial and error)) rendered that Markdown in this forum Markdown renderer with the following Markdown:
1. Connect to your server.
```
ssh yourserver
```
**Note:** If you leave out your username, then the `ssh` command defaults to your current usernameâthe one in your *`USER`* environment variable.
1. Reboot your server.
```
reboot
```
Consider the following details:
1. **Insight:** Rebooting your server applies industry standard troubleshooting technique.
1. **Gotcha:** If you reboot your server during business hours, then all your apps will go down.
Consider the following details about that Markdown:
- Observation: Notice that you can clearly see which notes, insights, and gotchas correspond to which commandâexcellent!
- Observation: Notice the surprising mechanism to actually render the nested codeblocks: I put 3 spaces in front of the code fences.
- Guess: This Obsidian problem is related to confusion about how to actual render nested code blocks in Markdown and for details about those Markdown challenges, see Fenced code blocks inside ordered and unordered lists gist comment and CommonMark Spec docs.
Conclusion
Nested code blocks are great for readability; but hard to actually type. The root cause might be related to the confusion about the Markdown specâsee Fenced code blocks inside ordered and unordered lists gist comment and CommonMark Spec docs.