Do not include excluded headlines when calculating headline index
This commit is contained in:
parent
d4f684b248
commit
7bc6100fc7
3 changed files with 20 additions and 21 deletions
|
@ -260,7 +260,9 @@ func (d *Document) parseMany(i int, stop stopFn) (int, []Node) {
|
|||
func (d *Document) addHeadline(headline *Headline) int {
|
||||
current := &Section{Headline: headline}
|
||||
d.Outline.last.add(current)
|
||||
d.Outline.count++
|
||||
if !headline.IsExcluded(d) {
|
||||
d.Outline.count++
|
||||
}
|
||||
d.Outline.last = current
|
||||
return d.Outline.count
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue