mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
tpl: Sync go_templates for Go 1.18
Using Go tag go1.18 4aa1efed4853ea067d665a952eee77c52faac774 Updates #9677
This commit is contained in:
@@ -4,7 +4,11 @@
|
||||
|
||||
package template
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/parse"
|
||||
)
|
||||
|
||||
// context describes the state an HTML parser must be in when it reaches the
|
||||
// portion of HTML produced by evaluating a particular template node.
|
||||
@@ -20,6 +24,7 @@ type context struct {
|
||||
jsCtx jsCtx
|
||||
attr attr
|
||||
element element
|
||||
n parse.Node // for range break/continue
|
||||
err *Error
|
||||
}
|
||||
|
||||
@@ -139,6 +144,8 @@ const (
|
||||
// stateError is an infectious error state outside any valid
|
||||
// HTML/CSS/JS construct.
|
||||
stateError
|
||||
// stateDead marks unreachable code after a {{break}} or {{continue}}.
|
||||
stateDead
|
||||
)
|
||||
|
||||
// isComment is true for any state that contains content meant for template
|
||||
|
Reference in New Issue
Block a user