Do not advance for forward skipSpaces (#176)
For backward, we should go one step back, but for forward we are already in the correct place. It doesn't change any tests.master
parent
ca471088e6
commit
23e6184309
|
@ -262,7 +262,7 @@ util.newlineExistsAfter = function(text, index) {
|
|||
|
||||
function skipSpaces(text, index, backwards) {
|
||||
const length = text.length;
|
||||
let cursor = backwards ? index - 1 : index + 1;
|
||||
let cursor = backwards ? index - 1 : index;
|
||||
// Look forward and see if there is a newline after/before this code
|
||||
// by scanning up/back to the next non-indentation character.
|
||||
while (cursor > 0 && cursor < length) {
|
||||
|
|
Loading…
Reference in New Issue