Skip to content

Parser removes ansible like comments #362

Open
@salemgolemugoo

Description

@salemgolemugoo

Version

1.67.0

Describe the bug

Consider you have an ini file produced by Ansible's blockinfile

# BEGIN
[profile test]
sso_region              = us-east-1
sso_registration_scopes = sso:account:access
region                  = us-east-1
output                  = json
# END

If you add new sections at the end of the file the library is going to strip # END part and Ansible won't be able to recognize the text block anymore

To reproduce

Use the ini file provided in the description and try to add a new sections at the end of the file

Expected behavior

Keep the '# END' comment after the section

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions