var transitionFunc … var commentStart … var commentEnd … // tText is the context transition function for the text state. func tText(c context, s []byte) (context, int) { … } var elementContentType … // tTag is the context transition function for the tag state. func tTag(c context, s []byte) (context, int) { … } // tAttrName is the context transition function for stateAttrName. func tAttrName(c context, s []byte) (context, int) { … } // tAfterName is the context transition function for stateAfterName. func tAfterName(c context, s []byte) (context, int) { … } var attrStartStates … // tBeforeValue is the context transition function for stateBeforeValue. func tBeforeValue(c context, s []byte) (context, int) { … } // tHTMLCmt is the context transition function for stateHTMLCmt. func tHTMLCmt(c context, s []byte) (context, int) { … } var specialTagEndMarkers … var specialTagEndPrefix … var tagEndSeparators … // tSpecialTagEnd is the context transition function for raw text and RCDATA // element states. func tSpecialTagEnd(c context, s []byte) (context, int) { … } // indexTagEnd finds the index of a special tag end in a case insensitive way, or returns -1 func indexTagEnd(s []byte, tag []byte) int { … } // tAttr is the context transition function for the attribute state. func tAttr(c context, s []byte) (context, int) { … } // tURL is the context transition function for the URL state. func tURL(c context, s []byte) (context, int) { … } // tJS is the context transition function for the JS state. func tJS(c context, s []byte) (context, int) { … } func tJSTmpl(c context, s []byte) (context, int) { … } // tJSDelimited is the context transition function for the JS string and regexp // states. func tJSDelimited(c context, s []byte) (context, int) { … } var blockCommentEnd … // tBlockCmt is the context transition function for /*comment*/ states. func tBlockCmt(c context, s []byte) (context, int) { … } // tLineCmt is the context transition function for //comment states, and the JS HTML-like comment state. func tLineCmt(c context, s []byte) (context, int) { … } // tCSS is the context transition function for the CSS state. func tCSS(c context, s []byte) (context, int) { … } // tCSSStr is the context transition function for the CSS string and URL states. func tCSSStr(c context, s []byte) (context, int) { … } // tError is the context transition function for the error state. func tError(c context, s []byte) (context, int) { … } // eatAttrName returns the largest j such that s[i:j] is an attribute name. // It returns an error if s[i:] does not look like it begins with an // attribute name, such as encountering a quote mark without a preceding // equals sign. func eatAttrName(s []byte, i int) (int, *Error) { … } var elementNameMap … // asciiAlpha reports whether c is an ASCII letter. func asciiAlpha(c byte) bool { … } // asciiAlphaNum reports whether c is an ASCII letter or digit. func asciiAlphaNum(c byte) bool { … } // eatTagName returns the largest j such that s[i:j] is a tag name and the tag type. func eatTagName(s []byte, i int) (int, element) { … } // eatWhiteSpace returns the largest j such that s[i:j] is white space. func eatWhiteSpace(s []byte, i int) int { … }