Unexpected LF when formatting a list o references
If using DumperOptions having IndicatorIndent > 0, this piece of text is expected:
#!
get:
summary: xxxxxxxxx
parameters:
- $ref: '#/parameters/ParamReference1'
- $ref: '#/parameters/ParamReference2'
... but this piece is dumped, instead:
#!
get:
summary: xxxxxxxxx
parameters:
-
$ref: '#/parameters/ParamReference1'
-
$ref: '#/parameters/ParamReference2'
Comments (10)
-
-
- changed status to invalid
We cannot fix it if you do not want to help.
-
I stumbled on this as well and created a test here: https://bitbucket.org/asomov/snakeyaml/pull-requests/4/test-showcasing-issue-416
-
It has been changed a zillion of times. The YAML indentation is too flexible to be configured.
Feel free to study the implementation and give a proposal which may possibly work.
Since your proposal may be backwards incompatible you can try to do it with SnakeYAML Engine instead. -
Can we add another option for
DumperOptions
for this issue, and that will be backwards compatible.Will this issue be fixed? And when?
Thx!
-
feel free to make a proposal.
-
@Andrey Somov Hi Andrey, I submitted a PR in github: #4, which could fix this issue, if you are free, please review it and let me know if there is any need to change it.
-
Great. I will check it either this week or next week.
-
- changed status to resolved
Fix issue416: add option of indentWithIndicator
→ <<cset ea06426f2d0f>>
-
Merge pull request #4 from Alanscut/indent
Fix issue416: Unexpected LF when formatting a list o references
→ <<cset fd0db70c4ef7>>
- Log in to comment
Test is appreciated.