Unexpected LF when formatting a list o references

Issue #416 resolved
José M. Reigosa created an issue

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)

  1. Andrey Somov

    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.

  2. jxyowen j

    Can we add another option for DumperOptions for this issue, and that will be backwards compatible.

    Will this issue be fixed? And when?

    Thx!

  3. Alan Wang

    @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.😀

  4. Log in to comment