Sorry, but I have no idea what you mean with source code. I am just a normal user not a programmer. I use Version 0.13.23. I tried it on my Mac and on Windows and in the Obsidian App on my iPad. Always the same result as shown in the screenshot. For me it seems to be a general bug in Obsidian.
Version 2 works with Obsidian v0.13.26. but the WYSIWYG in the editing mode differs from the final result as in your screenshot.
I changed from Roam Research to Obsidian, because I prefer Obsidians data-philosophy.
I think there is still a lot to do, if Obsidian want to compete with the outline functionality in Roam research. In Roam Research it is absolutely amazing and professional. For me it is the gold-standard.
i’m here too after searching for the answer. The Obsidian help link here also doesn’t fold for me, so seem folding in general could be broken?
I have indented the intended text to be folded, and in some cases the text is getting wrapped in backticks so this is the indented text even though it shouldn't look like this.
I only noticed the behaviour in the last day or two. I have tried the various settings, with no joy.
I also tried a workaround using a <details> block, but you can’t wrap code blocks inside HTML in Obsidian it seems, I assume for security measures.
Any ideas on a workaround or fix would be great. I’m trying to create an Q & A for learning, and having the answer on display already defeats the object
Here is a GIF using folding and showing the bug. It works in preview mode, but not in live mode. I even enabled the Legacy editor and it still doesn’t work