Skip to content

parser: mark empty unparseable sections as raw - #417

Merged
unknwon merged 1 commit into
go-ini:v1from
yuefdev:fix/empty-raw-section-sol
Nov 11, 2026
Merged

unknwon merged 1 commit into
go-ini:v1from
yuefdev:fix/empty-raw-section-sol

Conversation

@yuefdev

@yuefdev yuefdev commented Oct 18, 2026

Copy link
Copy Markdown

Describe the pull request

Mark unparseable sections as raw when reading their header, so SetBody works even without a body line.

Fixes #291. Three regressions fail before the fix: EOF with and without a newline, and a following section. Full Go tests, vet and gofmt pass on Windows/Go 1.27.0.

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code.

@unknwon
unknwon merged commit 8e2b219 into go-ini:v1 Nov 11, 2026
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.

Empty UnparseableSections is not marked as rawBody

2 participants