# Code blocks not working correctly?

**URL:** <https://meta.discourse.org/t/code-blocks-not-working-correctly/35451>\
**Category:** Bug\
**Created:** [2015 年 11 月 11 日午前 11:18 UTC](https://meta.discourse.org/t/code-blocks-not-working-correctly/35451 "2015-11-11T11:18:34Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2015 年 11 月 11 日午後 4:54 UTC](https://meta.discourse.org/t/code-blocks-not-working-correctly/35451/8 "2015-11-11T16:54:31Z")

</div>

I did, but you said you were trying to use both techniques to achieve a result that is best achieved using \<pre\> tags. (per my examples)

If you want to show someone how to use code blocks, use pre tags. Don’t try and embed code fences inside indents or indents inside code fences.

As for why the no highlight using indent, that may be a legit bug, but likely within highlight.js. I’m not sure why it isn’t figuring it out.

---

_[View the full topic](https://meta.discourse.org/t/code-blocks-not-working-correctly/35451)._
