mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-29 07:00:31 +03:00
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:
parent
1e3e34002d
commit
44da60d869
12 changed files with 75 additions and 142 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue