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: Restore   behavior from v0.1.27 #67

Merged
merged 1 commit into from Jul 1, 2020

Conversation

karfau
Copy link
Member

@karfau karfau commented Jun 28, 2020

Might be considered a breaking change.

fixes #57

Might be considered a breaking change.

fixes xmldom#57
@brodybits
Copy link
Member

Thanks. This would definitely be breaking for anything that does not expect \u00a0 characters for input with &nbsp characters.

@karfau
Copy link
Member Author

karfau commented Jun 29, 2020

I think it's a question of definition.
This was the behavior of 0.1.27 changed in 0.2.0 - 0.3.0(so not a semver issue since major is still 0),
Now it "breaks" it "back" so I guess we could call it 0.4.0.
or if you say it was an unintended regression we could include it in 0.3.1.

Your decision.

Copy link
Member

@brodybits brodybits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved to be merged after PR #77 - it would be nice for me to validate that the Stryker dashboard is updated with this change.

I do have one non-blocking suggestion.

@@ -13,13 +13,8 @@ wows.describe('html normalizer').addBatch({
assert(dom+'', '<div xmlns="http://www.w3.org/1999/xhtml">&lt;123e>&amp;&lt;a<br/></div>');

var dom = new DOMParser().parseFromString('<div>&nbsp;&copy;&nbsp&copy</div>','text/html');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var dom = new DOMParser().parseFromString('<div>&nbsp;&copy;&nbsp&copy</div>','text/html');
var dom = new DOMParser().parseFromString('<div>&copy;&nbsp;&copy;</div>>','text/html');

(simplify the test string and fix the indentation)

Or do we need to keep the "&nbsp&copy" part to test something? If so, I would kinda favor separate test strings, with separate test assertions, to check the &nbsp; behavior and to test with "&nbsp&copy".

I do think it would be better to break this test script into smaller test cases, and potentially multiple files, at some point.

TODO: The assertion would have to be updated as well. Unfortunately the GitHub suggested changes feature does not work for multiple lines if some lines were deleted in the middle.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the tests are not ideal, that's why I raised #72 to discuss the options.

I would avoid to mix this into other PRs to not loose track.



Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@brodybits brodybits merged commit 84eb68c into xmldom:master Jul 1, 2020
@brodybits
Copy link
Member

I went ahead with the merge, and the change does now show up on the Stryker dashboard. Thanks!

This was referenced Mar 13, 2021
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.

Regression regarding handling of &nbsp; with "(x)html" mimeType
2 participants