diff --git a/main.go b/main.go index e099348..152a459 100644 --- a/main.go +++ b/main.go @@ -70,9 +70,9 @@ func main() { file_lines := strings.Split(file_content, "\n") - for _, value := range file_lines { + for index, value := range file_lines { if is_heading(value) { - headings = append(headings, heading{value, 0, 0}) + headings = append(headings, heading{value, 0, (index + 1)}) } }