go/src/html/template/context.go

type context

func (c context) String() string {}

// eq reports whether two contexts are equal.
func (c context) eq(d context) bool {}

// mangle produces an identifier that includes a suffix that distinguishes it
// from template names mangled with different contexts.
func (c context) mangle(templateName string) string {}

type state

const stateText

const stateTag

const stateAttrName

const stateAfterName

const stateBeforeValue

const stateHTMLCmt

const stateRCDATA

const stateAttr

const stateURL

const stateSrcset

const stateJS

const stateJSDqStr

const stateJSSqStr

const stateJSTmplLit

const stateJSRegexp

const stateJSBlockCmt

const stateJSLineCmt

const stateJSHTMLOpenCmt

const stateJSHTMLCloseCmt

const stateCSS

const stateCSSDqStr

const stateCSSSqStr

const stateCSSDqURL

const stateCSSSqURL

const stateCSSURL

const stateCSSBlockCmt

const stateCSSLineCmt

const stateError

const stateDead

// isComment is true for any state that contains content meant for template
// authors & maintainers, not for end-users or machines.
func isComment(s state) bool {}

// isInTag return whether s occurs solely inside an HTML tag.
func isInTag(s state) bool {}

// isInScriptLiteral returns true if s is one of the literal states within a
// <script> tag, and as such occurrences of "<!--", "<script", and "</script"
// need to be treated specially.
func isInScriptLiteral(s state) bool {}

type delim

const delimNone

const delimDoubleQuote

const delimSingleQuote

const delimSpaceOrTagEnd

type urlPart

const urlPartNone

const urlPartPreQuery

const urlPartQueryOrFrag

const urlPartUnknown

type jsCtx

const jsCtxRegexp

const jsCtxDivOp

const jsCtxUnknown

type element

const elementNone

const elementScript

const elementStyle

const elementTextarea

const elementTitle

type attr

const attrNone

const attrScript

const attrScriptType

const attrStyle

const attrURL

const attrSrcset