# BUG: minor code block bug with nested code blocks

**URL:** <https://community.openai.com/t/bug-minor-code-block-bug-with-nested-code-blocks/1018718>\
**Category:** Bugs\
**Tags:** chatgpt\
**Created:** [November 15, 2024, 2:39am UTC](https://community.openai.com/t/bug-minor-code-block-bug-with-nested-code-blocks/1018718 "2024-11-15T02:39:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcinhu](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/marcinhu/32/499762_2.png) [@marcinhu](https://community.openai.com/u/marcinhu)\
**Post date:** [November 15, 2024, 2:39am UTC](https://community.openai.com/t/bug-minor-code-block-bug-with-nested-code-blocks/1018718/1 "2024-11-15T02:39:49Z")

</div>

Hi everyone,

I’ve noticed a minor but annoying bug when there’s a code block inside a Markdown code block, like the image below:

 ![bug-evidence](https://us1.discourse-cdn.com/openai1/original/4X/6/5/3/6532132f4e9b1fa4265644f00acfe0e773174204.png)

It seems that this forum’s message system also has this nested markdown code block formatting bug 😅 😅

But you can replicate it by using the prompt in the image.

Additionally, the UI for code blocks in user messages could use some love—it feels a bit clunky at the moment. Could this be looked into?

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![imkundeng](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/imkundeng/32/179397_2.png) [@imkundeng](https://community.openai.com/u/imkundeng)\
**Post date:** [January 1, 2025, 10:22pm UTC](https://community.openai.com/t/bug-minor-code-block-bug-with-nested-code-blocks/1018718/2 "2025-01-01T22:22:22Z")

</div>

github handles this correctly with indentated nested blocks.

chatgpt now dos it too:

 ![image](https://us1.discourse-cdn.com/openai1/original/4X/0/1/0/0107cae444a29e439f5381154d985d9d8335e594.png)
