diff --git a/internal/pkg/parse/capture.go b/internal/pkg/parse/capture.go index 184309b..7fcf2f2 100644 --- a/internal/pkg/parse/capture.go +++ b/internal/pkg/parse/capture.go @@ -42,7 +42,7 @@ func (s *sectionedTemplate) checkValidHeadings(capturedSections []capturedSectio } for _, headingSourceLineIndex := range headingSourceLineIndexes[1:] { - s.setFatalMessage(fmt.Sprintf("Section %s on line %d redeclared", heading, headingSourceLineIndexes[0]), headingSourceLineIndex) + s.setFatalMessage(fmt.Sprintf("Section %s on line %d redeclared", heading, headingSourceLineIndexes[0]+1), headingSourceLineIndex) } } }