func tText(c context, s []byte) (context, int) {
	k := 0
	for {
		i := k + bytes.IndexByte(s[k:], '<')
		if i < k || i+1 == len(s) {
			return c, len(s)
		} else if i+4 <= len(s) && bytes.Equal(commentStart, s[i:i+4]) {
			return context{state: stateHTMLCmt}, i + 4
		}
		i++
		end := false
		if s[i] == '/' {
			if i+1 == len(s) {
				return c, len(s)
			}
			end, i = true, i+1
		}
		j, e := eatTagName(s, i)
		if j != i {
			ret := context{state: stateTag}
			if !end {
				ret.element = e
			}
			return ret, j
		}
		k = j
	}
}
tText is the context transition function for the text state.
package template
import (
	"bytes"
	"strings"
)
var transitionFunc = [...]func(context, []byte) (context, int){
	stateText:               tText,
	stateSpecialElementBody: tSpecialTagEnd,
	stateTag:                tTag,
	stateAttrName:           tAttrName,
	stateAfterName:          tAfterName,
	stateBeforeValue:        tBeforeValue,
	stateHTMLCmt:            tHTMLCmt,
	stateAttr:               tAttr,
	stateError:              tError,
}
var commentStart = []byte("<!--")
var commentEnd = []byte("-->")