diff --git a/main.go b/main.go index 1a0fa05..c144c6b 100644 --- a/main.go +++ b/main.go @@ -33,22 +33,6 @@ func get_heading_level(heading_text string) int { return level } -func get_parents(headings []heading) { - for index, _ := range headings { - if index == 0 { - headings[index].parent = nil - continue - } - - for i := (index - 1); i >= 0; i-- { - if headings[i].level < headings[index].level { - headings[index].parent = &headings[i] - break - } - } - } -} - func parse_file(file_name string) []heading { file_content_raw, err := os.ReadFile(file_name) @@ -76,8 +60,6 @@ func main() { headings = parse_file(file_name) - get_parents(headings) - fmt.Println(path.Base(file_name)) tree(-1, "", headings) }