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

Option "indent" has no effect in version 0.6.2 #715

Open
developer-labs-lcc opened this issue Dec 31, 2024 · 0 comments
Open

Option "indent" has no effect in version 0.6.2 #715

developer-labs-lcc opened this issue Dec 31, 2024 · 0 comments

Comments

@developer-labs-lcc
Copy link

Setting more than the default 2 spaces as an option for indents does nothing:

const builder = new xml2js.Builder({ pretty: true, indent: ' ', newline: '\n' });

Only if you change the spaces in the file lib/defaults.js it works:

renderOpts: { 'pretty': true, 'indent': ' ', 'newline': '\n' },

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

No branches or pull requests

1 participant