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 Tokenizer onattribend's endIndex #1540

Merged
merged 4 commits into from
Jul 16, 2023

Conversation

DimaIT
Copy link
Contributor

@DimaIT DimaIT commented Jun 8, 2023

Fixes #1538

  1. For NoValue attributes endIndex is set to attribute name's end index
  2. For attributes with quotes endIndex moved one character forward to match actual attribute end

Output of the script from the ticket:

<a aaaaa   >
        ^
Attribute endIndex: 8

<a aaaaa >
        ^
Attribute endIndex: 8

<a a=aaa >
        ^
Attribute endIndex: 8

<a a="a" >
        ^
Attribute endIndex: 8

The fix makes endIndex consistent, however I'm a little bit worried that change for quoted attributes may be breaking for someone.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5535855124

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.655%

Totals Coverage Status
Change from base Build 5534370930: 0.0%
Covered Lines: 1734
Relevant Lines: 1740

💛 - Coveralls

@fb55 fb55 merged commit 685ccb6 into fb55:master Jul 16, 2023
8 checks passed
@fb55
Copy link
Owner

fb55 commented Jul 16, 2023

Awesome PR, thanks so much @DimaIT!

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.

endIndex is not consistent in Tokenizer's onattribend
3 participants