-
-
Notifications
You must be signed in to change notification settings - Fork 334
Add inline empty tag functionality when format is set to true #119
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
Add inline empty tag functionality when format is set to true #119
Conversation
Can you please mention the purpose and add necessary tests for this PR? |
I will add more details once finished. |
…ed. Export the parser through webpack.
@flaviocolonnascytl Any update on this PR? |
I have updated the goal and why we need it. |
@flaviocolonnascytl I hope you must have read the README completely before this change. And you must have noticed Please update the purpose/goal, if you have different aim. |
Hi, I read it and my purpose is different. I was meaning HOW it should be rendered and not if SHOULD be rendered. |
Have you tested with |
Yes of course. But the suppressEmptyNode option just render an empty tag like this: |
Either I'm failing to understand your point or to explain mine. Currently
<root>
<element>1</element>
<element2>
<subelement aaa="sub_aaa" />
</ element2>
<date>test</date>
</root>
<root>
<element>1</element>
<element2>
<subelement aaa="sub_aaa"></subelement>
</element2>
<date>test</date>
</root> Notice the I'm not able to understand how is your point different from this. |
@flaviocolonnascytl I would be happy to clear the doubts. |
Considering that this is the duplicate feature, Can we close this PR? I would like to hear back your views. |
The problem was when indentation was on. If you indentate an empty tag, it automatically is rendered as following:
Meanwhile, I want it to be rendered inline. |
Though I haven't tested that. It looks like you need a bug fix. And I'll suggest you raise a fresh PR for that. |
Purpose / Goal
The purpose of this edit is to allow to the developer to choose how an empty tag should be rendered.
In this case, setting a configuration variable to true, it is possible to render it as non self-closed tag.
Here below you'll find an example:
<myEmptyTag />
;<myEmptyTag></myEmptyTag>
This is useful when you have to check an xml signature and you want to create the xml from the json structure, according to your format.
Type
It is a new feature.
[ ]Bug Fix
[ ]Refactoring / Technology upgrade
[x]New Feature
Note : Please ensure that you've read contribution guidelines before raising this PR.