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.
@smortex smortex added this to the 7.0.0 milestone Apr 1, 2024
@smortex smortex force-pushed the 524-ini_setting-keep-sections branch 3 times, most recently from c524208 to 0905340 Compare April 1, 2024 20:27
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.
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.

None yet

2 participants