Skip to content

parser: keep trailing comments after last section - #401

Open
team-humaki wants to merge 1 commit into
go-ini:mainfrom
team-humaki:preserve-eof-section-comments
Open

team-humaki wants to merge 1 commit into
go-ini:mainfrom
team-humaki:preserve-eof-section-comments

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #362.

Comments after the last key of the last section were dropped on EOF, so rewriting a file (or adding a new section) stripped Ansible blockinfile # END markers.

Store those leftover comments on the last section as TrailingComment and write them after its keys so round-trip preserves the marker.

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

Successfully merging this pull request may close these issues.

Parser removes ansible like comments

1 participant