Skip to content

Commit 123fe3e

Browse files
authored
fix: use first subtract lineStart to get more accuracy indented length (#11)
1 parent 398220a commit 123fe3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rules_block/state_block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ StateBlock.prototype.getLines = function getLines(begin, end, indent, keepLastLF
228228
}
229229

230230
if (replaceIndentSpaceWithZWSP) {
231-
queue[i] = new Array(lineIndent + 1).join(ZWSP) + queue[i];
231+
queue[i] = new Array(first - lineStart + 1).join(ZWSP) + queue[i];
232232
}
233233
}
234234

0 commit comments

Comments
 (0)