-
-
Notifications
You must be signed in to change notification settings - Fork 334
Fix formatting for nodes with attributes #105
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
Merged
amitguptagwl
merged 10 commits into
NaturalIntelligence:master
from
juxe:fix-attr-format
Aug 16, 2018
Merged
Fix formatting for nodes with attributes #105
amitguptagwl
merged 10 commits into
NaturalIntelligence:master
from
juxe:fix-attr-format
Aug 16, 2018
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… building object nodes with options.format === true
Thanks for your PR. will you mind to add a test for that? |
…ent with attr value increase indent to for the text<![CDATA line
4 similar comments
…ATA nodes when options.format === true
This reverts commit d599e85.
ok, so I updated one of the current tests that was very similar to what I was writing, and it is working and passing tests now, but I'm hitting a block getting codeclimate to accept it. I'm sure there's a way to refactor it a bit for codeclimate to pass, but I'm not seeing it at the moment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose / Goal
I would like to fix a bug that I encountered when parsing json to xml with the format option flag set to true. If the JSON doc specifies nodes with an attr string and text value, an extra newline is added between the > of the open tag and the node text value, and extra whitespace is added to the end of the text value equal to n * level (where n is the number of spaces in indentBy, default 2).
#104
Type
Please mention the type of PR
[X]Bug Fix
[ ]Refactoring / Technology upgrade
[ ]New Feature
Note : Please ensure that you've read contribution guidelines before raising this PR.