Skip to content

Fix Tokenizer onattribend's endIndex#1540

Merged
fb55 merged 4 commits intofb55:masterfrom
DimaIT:fix-tokenizer-onattribend
Jul 16, 2023
Merged

Fix Tokenizer onattribend's endIndex#1540
fb55 merged 4 commits intofb55:masterfrom
DimaIT:fix-tokenizer-onattribend

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