Cleanup: Remove unused Document.StatusKeywords field & clean len checks
Leftover from the days before BufferSettings & DefaultSettings - now that those exists the status keywords are actually defined in - DefaultSettings["TODO"] for the default - BufferSettings["TODO"] for any customizations Also ! i < len => i >= len because it's easier on the eyes
This commit is contained in:
parent
d3d3b6c593
commit
fb39e59e6b
2 changed files with 2 additions and 3 deletions
|
@ -16,7 +16,6 @@ type Document struct {
|
|||
Nodes []Node
|
||||
Footnotes Footnotes
|
||||
Outline Outline
|
||||
StatusKeywords []string
|
||||
MaxEmphasisNewLines int
|
||||
AutoLink bool
|
||||
BufferSettings map[string]string
|
||||
|
@ -119,7 +118,7 @@ func (dIn *Document) Parse(input io.Reader) (d *Document) {
|
|||
d.Error = fmt.Errorf("parse was called multiple times")
|
||||
}
|
||||
d.tokenize(input)
|
||||
_, nodes := d.parseMany(0, func(d *Document, i int) bool { return !(i < len(d.tokens)) })
|
||||
_, nodes := d.parseMany(0, func(d *Document, i int) bool { return i >= len(d.tokens) })
|
||||
d.Nodes = nodes
|
||||
return d
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue