hugolib: Redo the summary delimiter logic

Now that we have a proper page parse tree, this can be greatly simplified.

See #5324
This commit is contained in:
Bjørn Erik Pedersen 2018-10-19 11:30:57 +02:00
parent 1e3e34002d
commit 44da60d869
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
12 changed files with 75 additions and 142 deletions

View file

@ -91,7 +91,7 @@ func collect(input []byte, skipFrontMatter bool, stateStart stateFunc) (items []
for {
item := t.Next()
items = append(items, item)
if item.Typ == tEOF || item.Typ == tError {
if item.Type == tEOF || item.Type == tError {
break
}
}
@ -104,7 +104,7 @@ func equal(i1, i2 []Item) bool {
return false
}
for k := range i1 {
if i1[k].Typ != i2[k].Typ {
if i1[k].Type != i2[k].Type {
return false
}
if !reflect.DeepEqual(i1[k].Val, i2[k].Val) {