removed struct member parent
This commit is contained in:
parent
c92fde4988
commit
7a998e6cbf
9
main.go
9
main.go
@ -11,10 +11,9 @@ import (
|
||||
)
|
||||
|
||||
type heading struct {
|
||||
text string
|
||||
level int
|
||||
line int
|
||||
parent *heading
|
||||
text string
|
||||
level int
|
||||
line int
|
||||
}
|
||||
|
||||
func is_heading(line string) bool {
|
||||
@ -47,7 +46,7 @@ func parse_file(file_name string) []heading {
|
||||
for index, value := range file_lines {
|
||||
if is_heading(value) {
|
||||
headings = append(
|
||||
headings, heading{value, get_heading_level(value), (index + 1), nil})
|
||||
headings, heading{value, get_heading_level(value), (index + 1)})
|
||||
}
|
||||
}
|
||||
return headings
|
||||
|
Loading…
Reference in New Issue
Block a user