tj / styl

Flexible and fast modular CSS preprocessor built on top of Rework
530 stars 21 forks source link

Doesn't support tabs #19

Open balupton opened 11 years ago

balupton commented 11 years ago

2 spaces:

$ node -e "console.log(require('styl')('ul\n  margin: 0', {whitespace:true}).toString())"
ul {
  margin: 0;
}

tabs:

$ node -e "console.log(require('styl')('ul\n\tmargin: 0', {whitespace:true}).toString())"

/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/node_modules/rework/node_modules/css/node_modules/css-parse/index.js:60
    throw err;
          ^
Error: missing '{' near line 3:12
    at error (/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/node_modules/rework/node_modules/css/node_modules/css-parse/index.js:56:15)
    at declarations (/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/node_modules/rework/node_modules/css/node_modules/css-parse/index.js:212:25)
    at rule (/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/node_modules/rework/node_modules/css/node_modules/css-parse/index.js:454:21)
    at rules (/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/node_modules/rework/node_modules/css/node_modules/css-parse/index.js:101:49)
    at stylesheet (/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/node_modules/rework/node_modules/css/node_modules/css-parse/index.js:71:16)
    at Object.module.exports [as parse] (/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/node_modules/rework/node_modules/css/node_modules/css-parse/index.js:458:10)
    at rework (/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/node_modules/rework/lib/rework.js:35:25)
    at new Style (/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/index.js:36:17)
    at Style (/Users/balupton/Projects/bevry/docpad-extras/plugins/styl/node_modules/styl/index.js:31:40)
    at [eval]:1:28
greduan commented 11 years ago

I can confirm this issue.

tj commented 11 years ago

issue in visionmedia/css-whitespace

RobLoach commented 10 years ago

:lock: