Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTup committed Oct 7, 2024
1 parent c6458da commit fa490df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/line_scanner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ class LineScanner extends StringScanner {
// No we need to know the offset after the newline. This is the index
// above plus the length of the newline (eg. if we found `\r\n`) we need
// to add two. However if no newline was found, that index is 0.
final offsetLastAfterNewline = lastNewline == -1
final offsetAfterLastNewline = lastNewline == -1
? 0
: string[lastNewline] == '\r' && string[lastNewline + 1] == '\n'
? lastNewline + 2
: lastNewline + 1;

_column = newPosition - offsetLastAfterNewline;
_column = newPosition - offsetAfterLastNewline;
}
}
}
Expand Down

0 comments on commit fa490df

Please sign in to comment.