# Syntax highlighting seems to be not working inside a list

**URL:** <https://meta.discourse.org/t/syntax-highlighting-seems-to-be-not-working-inside-a-list/30452>\
**Category:** Bug\
**Tags:** markdown\
**Created:** [25. Juni 2015 um 15:43 UTC](https://meta.discourse.org/t/syntax-highlighting-seems-to-be-not-working-inside-a-list/30452 "2015-06-25T15:43:21Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dmitry\_fedyuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmitry_fedyuk/32/293153_2.png) [@dmitry\_fedyuk](https://meta.discourse.org/u/dmitry_fedyuk)\
**Post date:** [26. Juni 2015 um 03:38 UTC](https://meta.discourse.org/t/syntax-highlighting-seems-to-be-not-working-inside-a-list/30452/5 "2015-06-26T03:38:35Z")

</div>

- My code from the first post **[works](http://spec.commonmark.org/dingus/?text=%23%23%23%20This%20is%20works%20%28outside%20of%20a%20list%2C%203%20back-ticks%20syntax%29%3A%0A%60%60%60javascript%0Avar%20s%20%3D%20%22JavaScript%20syntax%20highlighting%22%3B%0Aalert%28s%29%3B%0A%60%60%60%0A%0A%23%23%23%20This%20is%20not%20works%20%28a%20code%20block%20inside%20a%20list%2C%203%20back-ticks%20syntax%29%3A%0A%0A1.%20List%20item%201%0A%20%20%20%20%0A%20%20%20%20%60%60%60javascript%0A%20%20%20%20var%20s%20%3D%20%22JavaScript%20syntax%20highlighting%22%3B%0A%20%20%20%20alert%28s%29%3B%0A%20%20%20%20%60%60%60%0A1.%20List%20item%202%0A1.%20List%20item%203%0A%0A%23%23%23%20This%20is%20works%20%28a%20code%20block%20inside%20a%20list%20with%204%20spaces%20syntax%20but%20without%20highlighting%29%3A%0A%0A1.%20List%20item%201%0A%20%20%20%20%0A%20%20%20%20%20%20%20%20var%20s%20%3D%20%22JavaScript%20syntax%20highlighting%22%3B%0A%20%20%20%20%20%20%20%20alert%28s%29%3B%0A%0A1.%20List%20item%202%0A1.%20List%20item%203%0A%0ASo%2C%20is%20it%20a%20bug%20or%20I%20have%20missed%20something%3F%20%0AHow%20to%20do%20syntax%20highlighting%20inside%20a%20list%3F)** on CommonMark tester.  
It is correctly idented (but not highlighted because as I see CommonMark does not highlight code at all).  
So there is a clear difference: Discourse breaks my case №2 (3 back-ticks syntax) and CommonMark tester correctly renders it.

- GitHub code from my [post 3](https://meta.discourse.org/t/syntax-highlighting-seems-to-be-not-working-inside-a-list/30452/3) **[does not work](http://spec.commonmark.org/dingus/?text=1.%20foo%0A%0A%20%20%60%60%60%60python%0Aprint%20%27bar%27%0A%20%20%60%60%60%60%0A%0A%20%20%201.%20sub-foo%0A%0A%20%20%20%20%20%20%60%60%60%60python%0Aprint%20%27sub-bar%27%0A%20%20%20%20%20%20%60%60%60%60%0A%20%0A2.%20Bar)** on CommonMark tester.

---

_[View the full topic](https://meta.discourse.org/t/syntax-highlighting-seems-to-be-not-working-inside-a-list/30452)._
