Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix lua counting #29

Merged
merged 1 commit into from
Nov 2, 2016
Merged

fix lua counting #29

merged 1 commit into from
Nov 2, 2016

Conversation

cgag
Copy link
Owner

@cgag cgag commented Nov 2, 2016

There were actually 2 bugs here:

  1. problem where the multi-line pattern had the single-line
    pattern as a prefix (for lua: --, --[[.
  2. If the the start and end of multi-line comment are different lengths,
    we end up calling is_character_boundary out of bounds, which returns
    false, causing us to skip over valid characters

fixes #25

There were actually 2 bugs here:

1) problem where the multi-line pattern had the single-line
   pattern as a prefix (for lua: `--`, `--[[`.
2) If the the start and end of multi-line comment are different lengths,
   we end up calling is_character_boundary out of bounds, which returns
   false, causing us to skip over valid characters
@cgag cgag merged commit af1234d into master Nov 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect counts when multi-line pattern has the single-line pattern as a prefix.
1 participant