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

Comments breaks nested indentation #329

Open
lindhe opened this issue Nov 8, 2023 · 0 comments
Open

Comments breaks nested indentation #329

lindhe opened this issue Nov 8, 2023 · 0 comments

Comments

@lindhe
Copy link

lindhe commented Nov 8, 2023

It seems that comments breaks nested indentations sometimes.

$ dyff version                                                                                                                                                                      255 ↵
dyff version 1.6.0

MWE

foo.yaml

one:
  two:

bar.yaml

one:
  two:
    three:
      #comment: comment
      four: true
      five: true

Expected output

$ dyff between foo.yaml bar.yaml
     _        __  __
   _| |_   _ / _|/ _|  between foo.yaml
 / _' | | | | |_| |_       and bar.yaml
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned one difference
        |___/

one.two
  ± type change from <nil> to map
    - <nil>
    + three:
        #comment: comment
        four: true
          five: true

Actual output

$ dyff between foo.yaml bar.yaml
     _        __  __
   _| |_   _ / _|/ _|  between foo.yaml
 / _' | | | | |_| |_       and bar.yaml
| (_| | |_| |  _|  _|
 \__,_|\__, |_| |_|   returned one difference
        |___/

one.two
  ± type change from <nil> to map
    - <nil>
    + three:
        #comment: comment
      four: true
        five: true
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