Skip to content

Commit

Permalink
Prevent nesting from spanning sections
Browse files Browse the repository at this point in the history
  • Loading branch information
ravron committed Oct 29, 2021
1 parent 3099691 commit 4abc582
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@ func (f *File) parse(reader io.Reader) (err error) {
// Reset auto-counter and comments
p.comment.Reset()
p.count = 1
// Nested values can't span sections
isLastValueEmpty = false

inUnparseableSection = false
for i := range f.options.UnparseableSections {
Expand Down

0 comments on commit 4abc582

Please sign in to comment.