Skip to content

refactor: merge redundant ']' condition at start of while loop#698

Merged
karfau merged 1 commit intomasterfrom
refactor-692
Jul 28, 2024
Merged

refactor: merge redundant ']' condition at start of while loop#698
karfau merged 1 commit intomasterfrom
refactor-692

Conversation

@karfau
Copy link
Member

@karfau karfau commented Jul 28, 2024

with the fix added in #692 parseDoctypeInternalSubset has two places that check for the ending symbol and returned the internalSubSet as a string. By moving it to the beginning of the while loop, we only need to check the condition once.

I also added tests for more cases ending with a space before the closing square bracket.

with the proposed fix `parseDoctypeInternalSubset` had two places that checked for the ending symbol and returned the internalSubSet string.
By moving it to the beginning of the while loop, we only need to have it once.

I also added tests for more cases ending with a space before the closing square bracket.
@codecov
Copy link

codecov bot commented Jul 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.26%. Comparing base (560e578) to head (7de6ba0).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #698      +/-   ##
==========================================
- Coverage   94.28%   94.26%   -0.02%     
==========================================
  Files           8        8              
  Lines        2100     2094       -6     
  Branches      538      537       -1     
==========================================
- Hits         1980     1974       -6     
  Misses        120      120              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant