Skip to content

Commit 7134b74

Browse files
committed
rule-indent: loop fix
1 parent 1a038ca commit 7134b74

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

lib/options/rule-indent.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ module.exports = {
2121
* @param {node} node
2222
*/
2323
process: function(nodeType, node, level) {
24-
// increasing indent level
2524
if (nodeType === 'block') {
2625
if (node[0][0] !== 's') {
2726
node.unshift(['s', '']);
@@ -38,12 +37,8 @@ module.exports = {
3837
tail = node.splice(i);
3938
tail.unshift(space);
4039
Array.prototype.push.apply(node, tail);
40+
i++;
4141
}
42-
43-
// replacing last line space by value:
44-
// '' => '\n\t'
45-
// '\n ' => '\n\t'
46-
// '\n \n ' => '\n \n\t'
4742
space[1] = space[1].replace(/(\n)?([\t ]+)?$/, value);
4843
}
4944
};

0 commit comments

Comments
 (0)