-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Cosmetic: add option for space in self-closing tag #157
Comments
This would be very useful when using this library to modify a cordova config.xml. Cordova uses a space before the closing tag. As a result, any minor changes with this library looks like a massive rewrite to the file since every line is included in the diff. |
@oozcitak this feature is broken. Instead of adding a space, it adds the word <content src="index.html"true/>
<access origin="*"true/>
<allow-navigation href="http://ionic.local/*"true/>
<allow-navigation href="http://192.168.1.226:8100"true/>
<allow-intent href="http://*/*"true/>
<allow-intent href="https://*/*"true/>
<allow-intent href="tel:*"true/>
<allow-intent href="sms:*"true/>
<allow-intent href="mailto:*"true/>
<allow-intent href="geo:*"true/> |
@oozcitak I expected the |
This is by design. It requires the string to be inserted before the closing slash. See the wiki: https://github.com/oozcitak/xmlbuilder-js/wiki#converting-to-string |
I am adding a check for boolean true as well: 63d5143 |
In self-closing tags, there is no space before the slash (
<tag/>
instead of<tag />
). I know this is purely cosmetic, but I prefer having a space there.It would be nice to be able to control this behaviour with an option.
Bonus: The option could also add a space in the XML header:
<?xml version="1.0" encoding="UTF-8" ?>
instead of<?xml version="1.0" encoding="UTF-8"?>
The text was updated successfully, but these errors were encountered: