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

Keep sections when they become empty #536

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

smortex
Copy link
Collaborator

@smortex smortex commented Apr 1, 2024

When the last setting of a section was removed, the whole section was removed unless it contained white space of comments. In #532, this was changed to also remove sections that only contained space (blank lines), but it caused regressions and was reverted in #535.

For consistency, we completely suppress the auto-removal of "empty" sections: removing the last setting of a section will not remove this section anymore, just like what happens for sections with only blank lines and comments.

Also include:

PR #532 introduced 4ebe030 which breaks
backwards compatibility and is part of a patch release, as reported here:
#532 (comment)

This reverts commit 4ebe030.

This will allow us to do a new patch release that fix the unexpected
backwards incompatible change, and leave the room to implement this as
part of a next major version of the module.
When the last setting of a section was removed, the whole section was
removed unless it contained white space of comments.  In #532, this was
changed to also remove sections that only contained space (blank lines),
but it caused regressions and was reverted in #535.

For consistency, we completely suppress the auto-removal of "empty"
sections: removing the last setting of a section will not remove this
section anymore, just like what happens for sections with only blank
lines and comments.
@Ramesh7 Ramesh7 force-pushed the 524-ini_setting-keep-sections branch from 085e4a9 to 5635e76 Compare June 6, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants