fixed bug in get_child_indices function
This commit is contained in:
parent
5776805400
commit
21bb0bc95d
4
tree.go
4
tree.go
@ -37,6 +37,10 @@ func get_child_indices(header_index int, headings []heading) []int {
|
||||
|
||||
parent_level := get_heading_level(headings[header_index].text)
|
||||
|
||||
if header_index >= (len(headings) - 1) {
|
||||
return nil
|
||||
}
|
||||
|
||||
next_level := get_heading_level(headings[header_index+1].text)
|
||||
|
||||
child_level := 0
|
||||
|
Loading…
Reference in New Issue
Block a user