-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Disable escaping of non-latin characters #52
Conversation
This test was suggested in sebastianbergmann/phpunit#1236 (comment), but wasn't be implemented.
Codecov Report
@@ Coverage Diff @@
## master #52 +/- ##
============================================
+ Coverage 79.14% 82.26% +3.12%
+ Complexity 122 121 -1
============================================
Files 15 15
Lines 326 327 +1
============================================
+ Hits 258 269 +11
+ Misses 68 58 -10
Continue to review full report at Codecov.
|
Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it as it makes many unrelated changes. |
FYI: * |
FYI: |
Look closely at the diff. The only place where private function nodeToText() called is And there hardcoded
I meant that in fact it always become DOMDocument in the first lines of |
I agree with you, that there not only changes to fix the issue, but some refactoring changes in addition. I could try to split refactoring and actual issue fix in different commits to more easy analysis. I'll wait for your responce thought. |
FYI: I decided to not touch the question "should the |
I prefer single-purpose pull requests. Feel free to send new pull requests, one for each purpose, not mixing refactoring, new functionality, and bug fixes. |
This PR mainly solves #21.
I want to point to a few aspects of my changes:
Because tests not failed and I don't see why it needed. I could return it add appropriate tests if you explain me reason of this code.
2. I removed a lot of checks
instanceof DOMDocument
because in fact there is always DOMDocument in the $node in case if canonicalize is always true.3. I removed $canonicalize because in fact it is always true and the unused argument just make the code maintenance harder. Especially without corresponding unit-tests.
4. I made nodeToText public to be able to test it.
5.
I see the possible error with the $ignoreCase argument (it ignores case when set to false) and I could fix it in this PR or in the different. What do you think?Fixed in the #53I'll be happy to receive any criticism/suggestions about the appearance of my changes and tests.