# Folding applied on code block lines starting with "#"

**URL:** <https://forum.obsidian.md/t/folding-applied-on-code-block-lines-starting-with/39466>\
**Category:** Bug reports\
**Tags:** not-intuitive, repro, live-preview\
**Created:** [June 25, 2022, 6:06pm UTC](https://forum.obsidian.md/t/folding-applied-on-code-block-lines-starting-with/39466 "2022-06-25T18:06:53Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![karpets](https://forum.obsidian.md/user_avatar/forum.obsidian.md/karpets/32/67720_2.png) [@karpets](https://forum.obsidian.md/u/karpets)\
**Post date:** [June 27, 2024, 5:55am UTC](https://forum.obsidian.md/t/folding-applied-on-code-block-lines-starting-with/39466/18 "2024-06-27T05:55:21Z")

</div>

I can replicate the issue on both macOS and Windows 10. You can find more details here:

> [@Code Block Remains Visible in Folded Headings](https://forum.obsidian.md/t/code-block-remains-visible-in-folded-headings/84352):
>
> Bug Report: Code Block Remains Visible in Folded Headings After Restart Summary In Obsidian, I have a long tutorial (1278 lines) with headings (3 levels deep). When I restart my Mac and open Obsidian, the code block shows up right below the folded heading. However, the code block was initially placed deep inside the heading hierarchy. The expected behavior is to have the code block be hidden when the heading is folded. Steps to Reproduce Create a long tutorial in Obsidian with headings up to 3…

@WhiteNoise - thank you for directing me to this thread!

---

_[View the full topic](https://forum.obsidian.md/t/folding-applied-on-code-block-lines-starting-with/39466)._
