Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Tokenize empty lines correctly #101

Merged
merged 1 commit into from
Sep 23, 2017
Merged

Conversation

Ingramz
Copy link
Contributor

@Ingramz Ingramz commented Sep 23, 2017

This fixes an issue that appeared in #100 where empty strings were bailed out on too early.

The break condition used to be break if position is line.length + 1 with a comment suggesting that the 1 is for accounting the line feed character, however the position variable operates between characters, not on them. This means that position of line.length is actually the same as cursor being at the end of the line.

cc @50Wliu

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants