# Does YAML allow TAB for indentation?

**URL:** <https://www.ruby-forum.com/t/does-yaml-allow-tab-for-indentation/133961>\
**Category:** Ruby\
**Created:** [April 5, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/does-yaml-allow-tab-for-indentation/133961 "2008-04-05T17:49:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [April 5, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/does-yaml-allow-tab-for-indentation/133961/1 "2008-04-05T17:49:13Z")

</div>

Hi, I’m trying YAML with Ruby and it allows TAB for indentation, but it  
seems  
that it shouldn’t be allowed (at least Wikipedia says that).

Is then TAB allowed or not for indentation in YAML format?  
Maybe Ruby YAML allows it but it shouldn’t do it?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [April 5, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/does-yaml-allow-tab-for-indentation/133961/2 "2008-04-05T17:50:41Z")

</div>

“Is then TAB allowed or not for indentation in YAML format?  
Maybe Ruby YAML allows it but it shouldn’t do it?”

Cant give a definite answer on it but If i need to write rather freely  
in yaml I normally do:

entry: |  
"some really long  
string coming here… describing something etc… "

---

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [April 5, 2008, 5:54pm UTC](https://www.ruby-forum.com/t/does-yaml-allow-tab-for-indentation/133961/3 "2008-04-05T17:54:03Z")

</div>

2008/4/5, Iñaki Baz C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Iñaki Baz C.

No, it isn’t allowed in Ruby YAML too.

---

<div class="post-metadata">

**Author:** ![ISSSSaki\_Baz\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/51bf81/32.png) [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Post date:** [April 5, 2008, 5:59pm UTC](https://www.ruby-forum.com/t/does-yaml-allow-tab-for-indentation/133961/4 "2008-04-05T17:59:19Z")

</div>

El SÃ¡bado, 5 de Abril de 2008, IÃ±aki Baz C. escribiÃ³:

> Hi, I’m trying YAML with Ruby and it allows TAB for indentation, but it  
> seems that it shouldn’t be allowed (at least Wikipedia says that).

Sorry, my mistake. Ruby YAML doesn’t allow TAB for indentation.  
Fucking VI that converts TAB to spaces XDDD

:wq
