devine icon indicating copy to clipboard operation
devine copied to clipboard

Comments in config get double-newlined when modified by `devine cfg`

Open rlaphoenix opened this issue 2 years ago • 0 comments

Describe the bug The ruamel.yaml package which allows you to modify a YAML file while keeping comments, doesn't seem to end comments with the correct amount of newlines.

To Reproduce Steps to reproduce the behavior:

  1. Backup current config.
  2. Make a new config with:
# comment123
tag: Foo  # comment456
# comment789
  1. Run devine cfg tag Bar.
  2. Take a look at the config file which now looks like:
# comment123

tag: Bar   # comment456

# comment789

Expected behavior The before/after of the config should be the exact same apart from the tag changing from Bar to Foo.

Screenshots N/A

Additional context This can be incredibly annoying when using inline comments and such to add some notes and info to your config.

rlaphoenix avatar Feb 06 '23 03:02 rlaphoenix