fix: parse empty/whitspace only doctype internal subset#692
fix: parse empty/whitspace only doctype internal subset#692karfau merged 4 commits intoxmldom:masterfrom boshold:bugfix/691
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #692 +/- ##
==========================================
+ Coverage 94.27% 94.28% +0.01%
==========================================
Files 8 8
Lines 2096 2100 +4
Branches 537 538 +1
==========================================
+ Hits 1976 1980 +4
Misses 120 120 ☔ View full report in Codecov by Sentry. |
|
Thank you for your contribution. Once the formatting issue is fixed, I can land it. |
|
@karfau I added the test: https://github.com/xmldom/xmldom/pull/692/files#diff-7d53de1cebcbf7f6d753bd87ec5bd039dab2e818c406d35439c952419c1a2e42R125 Would be cool if you could create a beta12 afterwards! |
|
Thx for adding the test. I will try to release a new version soon, potentially even 0.9.0 |
|
@karfau I fixed the formatting. BTW (Not replated to the PR but for 0.9.0): There is currently an typing issue with the DOMImplementation - Its definied as a type but need to bedefined as a class to use the "new" keyword |
Thx
Thx for the information. Could you file a new issue for that? |
|
@kpalatzky for some reason I'm not able to push to the branch that you created to provide the changes. Update: I decided to land this PR and open a follow up for the refactoring, to avoid more waiting and delays before the upcoming release. |
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.
Added a condition to the parser to allow empty doctypes