Skip to content

Commit

Permalink
🐛 Resolve issue with indentation and parens
Browse files Browse the repository at this point in the history
Resolves #46
  • Loading branch information
Snugug committed Aug 29, 2015
1 parent 08be63e commit b4ebef0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/rules/indentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ module.exports = {
}
}

if (n.is('block') || n.is('atrulers') || n.is('parentheses')) {


if (n.is('block') || n.is('atrulers') || (n.is('parentheses') && !node.is('atruleb'))) {
level++;
}

Expand Down
4 changes: 4 additions & 0 deletions tests/sass/indentation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ content: 'bar';
.qux {
content: 'bar';
}

@if (1 == 1) {
content: 'foo';
}
}

@mixin bar {
Expand Down
2 changes: 1 addition & 1 deletion tests/scratch.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var lint = require('../index'),

// detects = lint.lintFiles('**/*.s+(a|c)ss');

detects = lint.lintFiles('sass/quotes.scss');
detects = lint.lintFiles('sass/indentation.scss');

console.log(lint.format(detects));

Expand Down

0 comments on commit b4ebef0

Please sign in to comment.