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
Christopher Chedeau 2017-01-13 20:00:36 -08:00 committed by James Long
parent ca471088e6
commit 23e6184309
1 changed files with 1 additions and 1 deletions

View File

@ -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) {