# Preserve tabs in code blocks (as they are semantic)

**URL:** <https://talk.commonmark.org/t/preserve-tabs-in-code-blocks-as-they-are-semantic/1165>\
**Category:** Spec\
**Created:** [April 28, 2015, 8:21am UTC](https://talk.commonmark.org/t/preserve-tabs-in-code-blocks-as-they-are-semantic/1165 "2015-04-28T08:21:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jgm](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/jgm/32/1360_2.png) [@jgm](https://talk.commonmark.org/u/jgm)\
**Post date:** [April 28, 2015, 4:16pm UTC](https://talk.commonmark.org/t/preserve-tabs-in-code-blocks-as-they-are-semantic/1165/2 "2015-04-28T16:16:39Z")

</div>

I think this is a good suggestion. Thanks for pointing out that the change would actually be consistent with the letter of Gruber’s original syntax description. I hadn’t noticed that before. [`Markdown.pl` and virtually all other implementations](http://johnmacfarlane.net/babelmark2/?text=%09%09hi%0A) just globally replace tabs with spaces before processing the document. (The most prominent exceptions are maruku, kramdown, and pandoc with `--preserve-tabs`). But I agree that it’s a real problem if you can’t put tabs in code blocks.

I’ll have to look at the reference implementations to see how hard it would be to implement this change. Meanwhile, other comments welcome.

---

_[View the full topic](https://talk.commonmark.org/t/preserve-tabs-in-code-blocks-as-they-are-semantic/1165)._
