removed struct member parent

This commit is contained in:
bjt-user 2024-05-06 01:34:25 +02:00
parent c92fde4988
commit 7a998e6cbf

View File

@ -11,10 +11,9 @@ import (
) )
type heading struct { type heading struct {
text string text string
level int level int
line int line int
parent *heading
} }
func is_heading(line string) bool { func is_heading(line string) bool {
@ -47,7 +46,7 @@ func parse_file(file_name string) []heading {
for index, value := range file_lines { for index, value := range file_lines {
if is_heading(value) { if is_heading(value) {
headings = append( headings = append(
headings, heading{value, get_heading_level(value), (index + 1), nil}) headings, heading{value, get_heading_level(value), (index + 1)})
} }
} }
return headings return headings