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
How to control indents via param options to dump? #468
Comments
https://github.com/nodeca/js-yaml#safedump-object---options-
|
Is this this a question or not? Is this issue solved? |
@diberry could you paste your results as text instead of a screenshot? just put three backticks in one line @puzrin it looks like a bug to me. in the picture on the right the YAML seems invalid. items like |
@perlpunk Thanks for the pointer. original
"noArrayIndent"= false
"noArrayIndent"=true
What I would like but not sure how to get it from .dump() - notice the same indent spacing as original.
|
That's certainly a bug, need fix. I've asked PR author. Or anyone else can do new PR. Seems happen when root is array (rare case, missed) |
@puzrin I would like to fix and PR. |
No problem. https://github.com/nodeca/js-yaml/pull/461/files - use this as example. If implementation will be correct, i'll approve & release asap. |
An extra 2 spaces is getting added on the item "C#" and its href. How do I turn this off?
original yaml:
`
href: index.yml
expanded: true
items:
href: https://cognitive.uservoice.com/knowledgebase/topics/asdfasdfasdfasdfasdfasdf/127872-luis-language-understanding-intelligent-service
`
Final yaml where last 2 lines have additional (but unwanted) 2 spaces:
`
href: index.yml
expanded: true
items:
href: 'https://cognitive.uservoice.com/knowledgebase/topics/asdfasdfasdfasdfasdfasdf/127872-luis-language-understanding-intelligent-service'
`
The text was updated successfully, but these errors were encountered: