EightMedia / styleguide.js

Generate a styleguide from your CSS, by adding YAML data
193 stars 8 forks source link

Can't use tabs to indent styleguide comment #18

Closed powerbuoy closed 8 years ago

powerbuoy commented 8 years ago

If I use tabs (\t) as opposed to spaces in my styleguide comments I get this error in the console:

YAMLException: end of the stream or a document separator is expected at line 3, column 2:

Can this be fixed? I'm a tab fan.

Aratramba commented 8 years ago

I don't have much time this week, but I'll see if I can fix this. Thanks for reporting this.

Aratramba commented 8 years ago

Why does YAML forbid tabs? Tabs have been outlawed since they are treated differently by different editors and tools. And since indentation is so critical to proper interpretation of YAML, this issue is just too tricky to even attempt. Indeed Guido van Rossum of Python has acknowledged that allowing TABs in Python source is a headache for many people and that were he to design Python again, he would forbid them.

http://www.yaml.org/faq.html

Greetings. I am one of the creators of YAML. Tabs are not allowed in indentation and an error should happen when they are detected in a place where indentation might occur. (…) FWIW, we spent every day for 3 months (circa 2003) trying to sanely allow tabs into YAML indentation. We came to the conclusion that it was an insane endeavor.

https://github.com/nodeca/js-yaml/issues/80

Can this be fixed?

I guess it can't, sorry.

powerbuoy commented 8 years ago

Oh I see :P thanks