Fix some issues with unicode syntax highlighting

Closes #604
This commit is contained in:
Zachary Yedidia 2017-03-27 14:40:42 -04:00
parent 75d4e70560
commit d087a890ba
4 changed files with 40 additions and 27 deletions

View file

@ -3,10 +3,23 @@ package highlight
import (
"regexp"
"strings"
"unicode/utf8"
"github.com/dlclark/regexp2"
)
// RunePos returns the rune index of a given byte index
// This could cause problems if the byte index is between code points
func runePos(p int, str string) int {
// if p < 0 {
// return -1
// }
// if p >= len(str) {
// return -1
// }
return utf8.RuneCountInString(str[:p])
}
func combineLineMatch(src, dst LineMatch) LineMatch {
for k, v := range src {
if g, ok := dst[k]; ok {
@ -49,7 +62,7 @@ func NewHighlighter(def *Def) *Highlighter {
// color's group (represented as one byte)
type LineMatch map[int]uint8
func findIndex(regex *regexp2.Regexp, str []rune, canMatchStart, canMatchEnd bool) []int {
func findIndex(regex *regexp2.Regexp, str []byte, canMatchStart, canMatchEnd bool) []int {
regexStr := regex.String()
if strings.Contains(regexStr, "^") {
if !canMatchStart {
@ -68,7 +81,7 @@ func findIndex(regex *regexp2.Regexp, str []rune, canMatchStart, canMatchEnd boo
return []int{match.Index, match.Index + match.Length}
}
func findAllIndex(regex *regexp.Regexp, str []rune, canMatchStart, canMatchEnd bool) [][]int {
func findAllIndex(regex *regexp.Regexp, str []byte, canMatchStart, canMatchEnd bool) [][]int {
regexStr := regex.String()
if strings.Contains(regexStr, "^") {
if !canMatchStart {
@ -83,7 +96,7 @@ func findAllIndex(regex *regexp.Regexp, str []rune, canMatchStart, canMatchEnd b
return regex.FindAllIndex([]byte(string(str)), -1)
}
func (h *Highlighter) highlightRegion(highlights LineMatch, start int, canMatchEnd bool, lineNum int, line []rune, region *Region, statesOnly bool) LineMatch {
func (h *Highlighter) highlightRegion(highlights LineMatch, start int, canMatchEnd bool, lineNum int, line []byte, region *Region, statesOnly bool) LineMatch {
// highlights := make(LineMatch)
if start == 0 {
@ -95,21 +108,21 @@ func (h *Highlighter) highlightRegion(highlights LineMatch, start int, canMatchE
loc := findIndex(region.end, line, start == 0, canMatchEnd)
if loc != nil {
if !statesOnly {
highlights[start+loc[1]-1] = region.group
highlights[start+runePos(loc[1]-1, string(line))] = region.group
}
if region.parent == nil {
if !statesOnly {
highlights[start+loc[1]] = 0
highlights[start+runePos(loc[1], string(line))] = 0
h.highlightRegion(highlights, start, false, lineNum, line[:loc[0]], region, statesOnly)
}
h.highlightEmptyRegion(highlights, start+loc[1], canMatchEnd, lineNum, line[loc[1]:], statesOnly)
h.highlightEmptyRegion(highlights, start+runePos(loc[1], string(line)), canMatchEnd, lineNum, line[loc[1]:], statesOnly)
return highlights
}
if !statesOnly {
highlights[start+loc[1]] = region.parent.group
highlights[start+runePos(loc[1], string(line))] = region.parent.group
h.highlightRegion(highlights, start, false, lineNum, line[:loc[0]], region, statesOnly)
}
h.highlightRegion(highlights, start+loc[1], canMatchEnd, lineNum, line[loc[1]:], region.parent, statesOnly)
h.highlightRegion(highlights, start+runePos(loc[1], string(line)), canMatchEnd, lineNum, line[loc[1]:], region.parent, statesOnly)
return highlights
}
@ -133,13 +146,13 @@ func (h *Highlighter) highlightRegion(highlights LineMatch, start int, canMatchE
}
}
if firstLoc[0] != len(line) {
highlights[start+firstLoc[0]] = firstRegion.group
highlights[start+runePos(firstLoc[0], string(line))] = firstRegion.group
h.highlightRegion(highlights, start, false, lineNum, line[:firstLoc[0]], region, statesOnly)
h.highlightRegion(highlights, start+firstLoc[1], canMatchEnd, lineNum, line[firstLoc[1]:], firstRegion, statesOnly)
h.highlightRegion(highlights, start+runePos(firstLoc[1], string(line)), canMatchEnd, lineNum, line[firstLoc[1]:], firstRegion, statesOnly)
return highlights
}
fullHighlights := make([]uint8, len([]rune(string(line))))
fullHighlights := make([]uint8, len(line))
for i := 0; i < len(fullHighlights); i++ {
fullHighlights[i] = region.group
}
@ -154,8 +167,8 @@ func (h *Highlighter) highlightRegion(highlights LineMatch, start int, canMatchE
}
for i, h := range fullHighlights {
if i == 0 || h != fullHighlights[i-1] {
if _, ok := highlights[start+i]; !ok {
highlights[start+i] = h
if _, ok := highlights[start+runePos(i, string(line))]; !ok {
highlights[start+runePos(i, string(line))] = h
}
}
}
@ -167,7 +180,7 @@ func (h *Highlighter) highlightRegion(highlights LineMatch, start int, canMatchE
return highlights
}
func (h *Highlighter) highlightEmptyRegion(highlights LineMatch, start int, canMatchEnd bool, lineNum int, line []rune, statesOnly bool) LineMatch {
func (h *Highlighter) highlightEmptyRegion(highlights LineMatch, start int, canMatchEnd bool, lineNum int, line []byte, statesOnly bool) LineMatch {
if len(line) == 0 {
if canMatchEnd {
h.lastRegion = nil
@ -188,10 +201,10 @@ func (h *Highlighter) highlightEmptyRegion(highlights LineMatch, start int, canM
}
if firstLoc[0] != len(line) {
if !statesOnly {
highlights[start+firstLoc[0]] = firstRegion.group
highlights[start+runePos(firstLoc[0], string(line))] = firstRegion.group
}
h.highlightEmptyRegion(highlights, start, false, lineNum, line[:firstLoc[0]], statesOnly)
h.highlightRegion(highlights, start+firstLoc[1], canMatchEnd, lineNum, line[firstLoc[1]:], firstRegion, statesOnly)
h.highlightRegion(highlights, start+runePos(firstLoc[1], string(line)), canMatchEnd, lineNum, line[firstLoc[1]:], firstRegion, statesOnly)
return highlights
}
@ -214,8 +227,8 @@ func (h *Highlighter) highlightEmptyRegion(highlights LineMatch, start int, canM
}
for i, h := range fullHighlights {
if i == 0 || h != fullHighlights[i-1] {
if _, ok := highlights[start+i]; !ok {
highlights[start+i] = h
if _, ok := highlights[start+runePos(i, string(line))]; !ok {
highlights[start+runePos(i, string(line))] = h
}
}
}
@ -236,7 +249,7 @@ func (h *Highlighter) HighlightString(input string) []LineMatch {
var lineMatches []LineMatch
for i := 0; i < len(lines); i++ {
line := []rune(lines[i])
line := []byte(lines[i])
highlights := make(LineMatch)
if i == 0 || h.lastRegion == nil {
@ -252,7 +265,7 @@ func (h *Highlighter) HighlightString(input string) []LineMatch {
// HighlightStates correctly sets all states for the buffer
func (h *Highlighter) HighlightStates(input LineStates) {
for i := 0; i < input.LinesNum(); i++ {
line := []rune(input.Line(i))
line := []byte(input.Line(i))
// highlights := make(LineMatch)
if i == 0 || h.lastRegion == nil {
@ -276,7 +289,7 @@ func (h *Highlighter) HighlightMatches(input LineStates, startline, endline int)
break
}
line := []rune(input.Line(i))
line := []byte(input.Line(i))
highlights := make(LineMatch)
var match LineMatch
@ -300,7 +313,7 @@ func (h *Highlighter) ReHighlightStates(input LineStates, startline int) {
h.lastRegion = input.State(startline - 1)
}
for i := startline; i < input.LinesNum(); i++ {
line := []rune(input.Line(i))
line := []byte(input.Line(i))
// highlights := make(LineMatch)
// var match LineMatch
@ -322,7 +335,7 @@ func (h *Highlighter) ReHighlightStates(input LineStates, startline int) {
// ReHighlightLine will rehighlight the state and match for a single line
func (h *Highlighter) ReHighlightLine(input LineStates, lineN int) {
line := []rune(input.Line(lineN))
line := []byte(input.Line(lineN))
highlights := make(LineMatch)
h.lastRegion = nil

View file

@ -1920,7 +1920,7 @@ func runtimeSyntaxHtmlYaml() (*asset, error) {
return a, nil
}
var _runtimeSyntaxHtml4Yaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x54\x71\x8b\xdc\xb6\x13\xfd\xfb\x77\x9f\xc2\xf1\xaf\x14\xe9\xd2\xb5\x13\x12\x02\x75\x2e\x67\xda\x24\xa5\x85\xb4\x0d\xe5\x4a\x29\xbb\x7b\x20\x4b\x63\xaf\x58\x59\x72\xa4\xf1\x6e\xb6\x7d\xfd\xee\x45\xde\x5c\xd3\x90\xab\x58\xc4\xa2\x19\xeb\x8d\xe6\xbd\x79\xbd\x75\xc4\xa7\x89\x9a\x62\xc7\xa3\x7b\x7a\x71\x61\x88\x49\x73\x53\x5c\x14\x45\x51\xe4\xa8\x57\x23\x35\x45\xb9\xd9\x54\x3b\x1e\xd7\x6e\xdb\x7e\x51\x2e\xb1\x1d\x29\x43\xb1\x29\xca\xab\x07\xaf\x7e\x7e\x79\xf3\xfb\xdb\xd7\xc5\xf7\x37\x3f\xbe\x29\xde\xfe\xfa\xed\x9b\x1f\x5e\x16\x9b\x72\x55\xd7\xbf\x3d\x79\x59\xd7\xaf\x6e\x5e\x9d\x23\x4f\xab\x47\x8f\xeb\xfa\xf5\x4f\xd8\x31\x4f\x4d\x5d\x1f\x8f\xc7\xea\xf8\xa4\x0a\x71\xa8\x6f\x7e\xa9\x17\xfc\x3a\x71\xb4\x9a\x2b\xc3\x66\x53\x5e\x97\x17\x17\x71\x76\x94\x9a\x05\x70\x55\x50\x8c\x61\x41\x5c\xdf\x3e\xd8\x56\x97\xed\x75\xf9\x21\x90\x4e\x63\x17\x5c\xc5\x6a\x68\x8a\x52\xb4\x56\x5e\xad\xeb\x6d\x2b\x94\xe8\xba\x08\x1d\x83\x3f\x8d\x30\x26\x52\x4a\x98\x26\x47\x8c\x48\x0a\x91\xad\x76\x84\x64\x0d\x61\x36\x36\xc8\x16\x9d\x50\x89\x44\x1f\x3c\xcb\x16\x46\x58\x04\x09\x3b\xc0\x05\xbd\x7f\x37\x07\x26\x44\xd9\x42\x2b\xe1\x0f\x2a\x61\x62\x1b\xbc\x84\x26\xcf\x14\xa1\x2d\x13\x74\x10\x86\xe0\xe0\x86\x18\xe6\x49\xc2\x08\xc5\x4a\x38\x9b\x96\xfb\x40\x0e\xc4\xca\xba\x84\xde\xc3\x2a\x17\x06\xd8\x08\x07\x96\xa0\x51\x74\x64\x64\x8b\xde\x92\x33\x89\x18\xbd\x1d\x84\x56\x0b\x08\xe6\x48\x12\xb9\x2c\xf4\x21\x8e\x10\x56\xb6\x7d\x54\x23\x61\xd9\x73\xf6\x6e\xfd\x78\xf5\x6c\x8b\x5d\x84\x85\x1d\x07\x58\x2f\xa6\x99\x91\x24\xf6\x9d\xc1\x9e\x4e\x03\x79\x38\xd5\x91\x83\xa3\x81\xbc\x81\xb3\xc2\xef\x65\x8b\x51\x09\xeb\x31\x21\xee\x25\x46\xf2\xb3\xb0\x4c\x63\x3e\x27\x16\x0a\x14\x25\xbc\x3a\xc0\x07\x71\xc6\x42\xd2\xd1\x4e\x2c\x11\x84\xc3\xc4\x62\x79\x29\x96\x4e\xcc\x3c\xcd\x2c\x31\x09\x15\xd5\x08\xab\x79\x8e\x84\xfc\x0b\x43\x6e\xbd\x6c\xf1\x0e\x51\x4c\x60\xcc\xdd\x49\x22\x09\x8e\x76\x4f\xb2\x45\x52\xe3\x84\x44\x42\x2f\x8f\x75\xa4\x59\x22\x8d\xca\x39\xa4\x30\x47\x4d\x48\x93\xf2\x48\x1c\x83\x1f\x90\x66\xd1\x61\xc2\x38\xaa\x78\x92\x60\x7a\xcf\x2a\xb3\xc9\x76\x24\x70\x54\x7a\x8f\x59\x38\xd9\xe2\xa0\x22\x0e\xd6\x50\xc0\xb1\x8b\x52\x14\xd5\x25\xae\xe5\xbd\x9a\xa9\xe8\x3d\x93\x37\x64\x3e\x11\x4f\x17\xcc\x09\xc6\x1e\x90\x85\x89\xac\x76\x41\x99\xfe\x3e\x84\xcc\x37\x5b\x76\x04\x56\x5d\xde\x3f\x24\x63\x27\x48\x65\x12\xe3\x92\x25\x17\xd4\x7f\x63\x4e\x91\xa6\x18\xf4\x27\x38\xe7\x7e\x22\xf1\xc9\xd1\x67\x1f\xa4\x89\xb4\x55\xae\x29\xca\x2f\xd7\xb7\xcf\xd7\xeb\x26\x4d\x4a\x53\xb3\xdd\x6e\x2f\x9f\x7f\xfa\x90\xa6\x28\xd7\xcd\x8b\xed\xdd\xa1\x35\xe4\xd9\xf6\x76\x99\x50\xa1\x1c\xa3\x1b\x74\x70\x21\x62\x47\x76\xd8\x31\x76\x91\x7a\x58\x73\xa7\x89\xe0\x07\x43\x49\x23\x4f\x3b\x82\x17\xda\x59\xbd\x47\x1f\xf4\x9c\xe0\x82\x32\x18\xc3\x9c\x28\x1c\xb2\x1e\x92\xfd\xe3\x8e\x92\xa8\xcf\x85\x83\x55\x1c\x88\x91\xad\x04\x07\xe5\x66\xc2\xd1\x1a\xde\xc9\x17\x77\x05\xe9\xe0\x13\x2b\xcf\x55\x9e\x70\x9f\xe7\x74\x53\xae\x6f\x37\xe5\xf6\x72\x53\x7e\x96\xe3\xe7\xb1\x3b\x57\xde\x5a\xf9\xff\xf5\xa3\xd5\xd7\xdf\xac\xbe\xdb\xfe\xf9\xec\xab\x67\x7f\xdd\xe5\x1a\xea\xd5\xec\xf8\x6c\x0d\x79\x25\x56\x91\x9b\xa2\xfc\xd0\xbb\xbc\xc8\x67\x4a\xaf\x3e\x1e\x9c\xdd\xa4\x58\x6f\x2f\xee\x33\x8e\x2b\x5c\xff\x47\xb5\xd5\x1c\x73\x83\x45\xcf\x93\xc8\x3a\xce\x06\xb6\xfc\x19\x2c\x43\xef\x62\x18\x49\x36\x75\xbd\xbe\x2d\xfe\xb7\x7d\xf8\xf1\x8e\x71\x24\xcf\x8b\x43\xae\x56\xd5\xc3\x76\xb5\xba\x47\x08\xff\xb8\x67\xf5\x30\xd3\xfe\x77\x00\x00\x00\xff\xff\xc9\x22\x4f\x7c\x90\x05\x00\x00")
var _runtimeSyntaxHtml4Yaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x54\x71\x8b\xdc\xb6\x13\xfd\xfb\x77\x9f\xc2\xf1\xaf\x14\xe9\xd2\xb5\x13\x12\x02\x75\x2e\x67\xda\x24\xa5\x85\xb4\x0d\xe5\x4a\x29\xbb\x7b\x20\x4b\x63\xaf\x58\x59\x72\xa4\xf1\x6e\xb6\x7d\xfd\xee\x45\xde\x5c\xd3\x90\xab\x58\xc4\xa2\x19\xeb\x8d\xe6\xbd\x79\xbd\x75\xc4\xa7\x89\x9a\x62\xc7\xa3\x7b\x7a\x71\x61\x88\x49\x73\x53\x5c\x14\x45\x51\xe4\xa8\x57\x23\x35\x45\xb9\xd9\x54\x3b\x1e\xd7\x6e\xdb\x3e\xfd\xa2\x5c\x82\x3b\x52\x86\x62\x53\x94\x57\x0f\x5e\xfd\xfc\xf2\xe6\xf7\xb7\xaf\x8b\xef\x6f\x7e\x7c\x53\xbc\xfd\xf5\xdb\x37\x3f\xbc\x2c\x36\xe5\xaa\xae\x7f\x7b\xf2\xb2\xae\x5f\xdd\xbc\x3a\x47\x9e\x56\x8f\x1e\xd7\xf5\xeb\x9f\xb0\x63\x9e\x9a\xba\x3e\x1e\x8f\xd5\xf1\x49\x15\xe2\x50\xdf\xfc\x52\x2f\x05\xd4\x89\xa3\xd5\x5c\x19\x36\x9b\xf2\xba\xbc\xb8\x88\xb3\xa3\xd4\x2c\x80\xab\x82\x62\x0c\x0b\xe2\xfa\xf6\xc1\xb6\xba\x6c\xaf\xcb\x0f\x81\x74\x1a\xbb\xe0\x2a\x56\x43\x53\x94\xa2\xb5\xf2\x6a\x5d\x6f\x5b\xa1\x44\xd7\x45\xe8\x18\xfc\x69\x84\x31\x91\x52\xc2\x34\x39\x62\x44\x52\x88\x6c\xb5\x23\x24\x6b\x08\xb3\xb1\x41\xb6\xe8\x84\x4a\x24\xfa\xe0\x59\xb6\x30\xc2\x22\x48\xd8\x01\x2e\xe8\xfd\xbb\x39\x30\x21\xca\x16\x5a\x09\x7f\x50\x09\x13\xdb\xe0\x25\x34\x79\xa6\x08\x6d\x99\xa0\x83\x30\x04\x07\x37\xc4\x30\x4f\x12\x46\x28\x56\xc2\xd9\xb4\xdc\x07\x72\x20\x56\xd6\x25\xf4\x1e\x56\xb9\x30\xc0\x46\x38\xb0\x04\x8d\xa2\x23\x23\x5b\xf4\x96\x9c\x49\xc4\xe8\xed\x20\xb4\x5a\x40\x30\x47\x92\xc8\x65\xa1\x0f\x71\x84\xb0\xb2\xed\xa3\x1a\x09\xcb\x9e\xb3\x77\xeb\xc7\xab\x67\x5b\xec\x22\x2c\xec\x38\xc0\x7a\x31\xcd\x8c\x24\xb1\xef\x0c\xf6\x74\x1a\xc8\xc3\xa9\x8e\x1c\x1c\x0d\xe4\x0d\x9c\x15\x7e\x2f\x5b\x8c\x4a\x58\x8f\x09\x71\x2f\x31\x92\x9f\x85\x65\x1a\xf3\x39\xb1\x50\xa0\x28\xe1\xd5\x01\x3e\x88\x33\x16\x92\x8e\x76\x62\x89\x20\x1c\x26\x16\xcb\x4b\xb1\x74\x62\xe6\x69\x66\x89\x49\xa8\xa8\x46\x58\xcd\x73\x24\xe4\x5f\x18\x72\xeb\x65\x8b\x77\x88\x62\x02\x63\xee\x4e\x12\x49\x70\xb4\x7b\x92\x2d\x92\x1a\x27\x24\x12\x7a\x79\xac\x23\xcd\x12\x69\x54\xce\x21\x85\x39\x6a\x42\x9a\x94\x47\xe2\x18\xfc\x80\x34\x8b\x0e\x13\xc6\x51\xc5\x93\x04\xd3\x7b\x56\x99\x4d\xb6\x23\x81\xa3\xd2\x7b\xcc\xc2\xc9\x16\x07\x15\x71\xb0\x86\x02\x8e\x5d\x94\xa2\xa8\x2e\x71\x2d\xef\xd5\x4c\x45\xef\x99\xbc\x21\xf3\x89\x78\xba\x60\x4e\x30\xf6\x80\x2c\x4c\x64\xb5\x0b\xca\xf4\xf7\x21\x64\xbe\xd9\xb2\x23\xb0\xea\xf2\xfe\x21\x19\x3b\x41\x2a\x93\x18\x97\x2c\xb9\xa0\xfe\x1b\x73\x8a\x34\xc5\xa0\x3f\xc1\x39\xf7\x13\x89\x4f\x8e\x3e\xfb\x20\x4d\xa4\xad\x72\x4d\x51\x7e\xb9\xbe\x7d\xbe\x5e\x37\x69\x52\x9a\x9a\xed\x76\x7b\xf9\xfc\xd3\x87\x34\x45\xb9\x6e\x5e\x6c\xef\x0e\xad\x21\xcf\xb6\xb7\xcb\x84\x0a\xe5\x18\xdd\xa0\x83\x0b\x11\x3b\xb2\xc3\x8e\xb1\x8b\xd4\xc3\x9a\x3b\x4d\x04\x3f\x18\x4a\x1a\x79\xdc\x11\xbc\xd0\xce\xea\x3d\xfa\xa0\xe7\x04\x17\x94\xc1\x18\xe6\x44\xe1\x90\xf5\x90\xec\x1f\x77\x94\x44\x7d\x2e\x1c\xac\xe2\x40\x8c\xec\x25\x38\x28\x37\x13\x8e\xd6\xf0\x4e\xbe\xb8\x2b\x48\x07\x9f\x58\x79\xae\xf2\x84\xfb\x3c\xa7\x9b\x72\x7d\xbb\x29\xb7\x97\x9b\xf2\xb3\x1c\x3f\x8f\xdd\xb9\xf2\xd6\xca\xff\xaf\x1f\xad\xbe\xfe\x66\xf5\xdd\xf6\xcf\x67\x5f\x3d\xfb\xeb\x2e\xd7\x50\xaf\x66\xc7\x67\x6b\xc8\x2b\xb1\x8a\xdc\x14\xe5\x87\xde\xe5\x45\x3e\x53\x7a\xf5\xf1\xe0\xec\x26\xc5\x7a\x7b\x71\x9f\x71\x5c\xe1\xfa\x3f\xaa\xad\xe6\x98\x1b\x2c\x7a\x9e\x44\xd6\x71\x36\xb0\xe5\xcf\x60\x19\x7a\x17\xc3\x48\xb2\xa9\xeb\xf5\x6d\xf1\xbf\xed\xc3\x8f\x77\x8c\x23\x79\x5e\x1c\x72\xb5\xaa\x1e\xb6\xab\xd5\x3d\x42\xf8\xc7\x3d\xab\x87\x99\xf6\xbf\x03\x00\x00\xff\xff\x65\x55\x73\x5e\x91\x05\x00\x00")
func runtimeSyntaxHtml4YamlBytes() ([]byte, error) {
return bindataRead(
@ -1940,7 +1940,7 @@ func runtimeSyntaxHtml4Yaml() (*asset, error) {
return a, nil
}
var _runtimeSyntaxHtml5Yaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x54\x5d\x6f\xe4\x34\x14\x7d\x66\x7e\x45\x36\x20\x64\xb7\xcc\x14\x1e\xa8\x44\xb6\xdb\x11\xe2\xe3\x15\x1e\x78\x41\x69\x2a\x39\xf6\x4d\x62\xc6\x1f\x59\xfb\x7a\x76\x07\x0e\xff\x1d\x25\x9d\x61\x55\xb5\x6b\x29\x56\xec\x7b\xe4\xfb\x75\xce\x1d\xac\x23\x3e\xcd\xd4\x54\x13\x7b\xf7\xfd\x66\x63\x88\x49\x73\x53\x6d\xaa\xaa\xaa\x16\x6b\x50\x9e\x9a\xaa\x7e\x78\xd8\x4d\xec\x5b\xd7\xed\xbf\xaa\x57\xdb\x44\xca\x50\x6a\xaa\xfa\xee\xcd\xcf\xbf\xfd\xf4\xc7\x9f\xbf\xff\xf2\xf4\xc4\x7d\xbd\xd9\xa4\xe2\x28\x37\x2b\x6c\x5b\x51\x4a\x71\xc5\xb5\x8f\x6f\xba\xdd\xd5\xfe\xbe\x3e\x1b\xf2\xc9\xf7\xd1\xed\x58\x8d\x4d\x55\x8b\xbd\x95\x77\xed\x4d\xb7\x17\x0a\x4a\xf4\x7d\x82\x31\x89\x72\x46\x22\x85\xc4\x56\x3b\x42\xb6\x86\x50\x8c\x8d\x12\x3d\x7a\xa1\x32\xc1\x08\x8b\x28\xe1\xa2\x3e\xbc\x2f\x91\x09\x09\x85\x39\x06\x09\xad\x44\x38\xaa\x8c\x99\xed\x7a\xa4\xc0\x94\xa0\x2d\x13\x74\x14\x86\xe0\xe0\xc6\x14\xcb\x2c\x61\x84\x62\x05\xc5\xca\xd9\xcc\x30\x20\x07\x62\x65\x5d\xc6\x10\x60\x95\x8b\x23\x1c\x58\x82\x3c\xc8\xf7\x64\x30\x58\x72\x26\x13\x63\xb0\xa3\xd0\x6a\x75\x81\x92\x48\x62\x88\xc9\xc3\x0e\x49\x79\xc2\xd4\x7e\xb7\xbd\xed\x30\x25\x58\x58\x3f\xc2\x06\x31\x17\x46\x96\x38\xf4\x06\x07\x3a\x8d\x14\xe0\x54\x4f\x0e\x8e\x46\x0a\x06\xce\xc2\xd9\x70\x80\x57\xc2\x06\xcc\x48\x07\x09\x4f\xa1\xac\x9b\x65\xf2\xf0\xc4\x42\x81\x92\x44\x50\x47\x84\x98\x75\xb2\x33\x23\x8a\xfe\x2f\xd2\x0c\x87\x99\xc5\x9a\x15\xd6\xac\x0b\xcf\x85\x25\x66\xcc\x2a\x29\x8f\xd9\x6a\x2e\x89\x30\xaf\x5f\x1c\xd7\x02\xbf\x47\x12\x33\x18\xa5\x3f\x49\x64\x64\xe5\x67\x64\x12\x7a\x4d\xca\x91\x66\x89\xec\x95\x73\xc8\xb1\x24\x4d\xc8\xb3\x0a\xc8\x9c\x62\x18\x91\x8b\xe8\x31\xc3\x7b\x95\x4e\x12\x4c\x1f\x59\x2d\xfd\x62\xeb\x09\x9c\x94\x3e\xa0\xa0\x38\x1c\x55\xc2\xd1\x1a\x8a\xf8\xd0\x27\x29\xaa\xdd\x95\x7c\x95\x07\x3b\xfa\xc8\x14\x0c\x99\x67\x84\xe8\xa3\x39\xc1\xd8\x23\x16\x7e\x61\xe1\x9d\xa0\x24\xf7\x18\x62\x5c\x5a\xca\x96\x1d\x81\x55\xbf\xec\x67\x30\x26\x41\xca\xc8\x3d\xd2\x8a\x92\x2f\x7c\xce\x89\xe6\x14\xf5\x33\x3f\xe7\x5a\x66\x3e\x39\x7a\x19\xe4\x4c\xda\x2a\xd7\x54\xf5\xd7\xed\xe3\xdb\xb6\x6d\xf2\xac\x34\x35\x5d\xd7\x5d\xbd\x7d\x9e\x48\x53\xd5\x6d\xf3\xae\xbb\x5c\x5a\x43\x81\xed\x60\x57\xad\x08\xe5\x18\xfd\xa8\xa3\x8b\x09\x13\xd9\x71\x62\x4c\x89\x06\x58\x73\x61\x42\x0c\xa3\xa1\xac\xb1\xe8\x0e\x31\x08\xed\xac\x3e\x60\x88\xba\x64\xb8\xa8\x0c\x7c\x2c\x99\xe2\x71\xe1\x40\xb6\x7f\x5f\xfa\x91\xf4\x53\xe0\x60\x95\x46\x62\x2c\xa2\xc6\x51\xb9\x42\xf8\x60\x0d\x4f\xf2\xdd\x25\x20\x1d\x43\x66\x15\x78\x97\x39\xd9\xb0\x68\xef\xa1\x6e\x1f\x1f\xea\xee\xea\xa1\x7e\x81\x09\xc5\xf7\x4f\x91\xef\xad\xfc\xb2\xfd\x76\xfb\xc3\x8f\xdb\x5f\xbb\x7f\x6e\xbf\xb9\xfd\xf7\x82\x35\x34\xa8\xe2\xf8\x49\xee\xcb\xca\xac\x12\x37\x55\x7d\xae\xdd\xb2\x28\x2c\x2d\xbd\xfb\x74\xf1\x34\x21\xaa\xb6\xdb\xbc\x36\x0c\xee\x70\xff\x99\x68\x77\x25\x2d\x05\x16\x03\xcf\x22\xcb\x3d\x26\x3e\xff\x8c\x96\xa1\xa7\x14\x3d\xc9\xe6\xe6\xa6\x7d\xac\xbe\xe8\xae\x3f\xbd\xe1\x3d\x05\x5e\x67\xd5\x76\xbb\xbb\xde\x6f\xb7\xaf\x10\xe1\xff\x39\xb6\xbb\x5e\xda\xfe\x5f\x00\x00\x00\xff\xff\xfd\x58\xde\x3f\x1a\x05\x00\x00")
var _runtimeSyntaxHtml5Yaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\x54\x5d\x6f\xe4\x34\x14\x7d\x66\x7e\x45\x36\x20\x64\xb7\xcc\x14\x1e\xb6\x12\xd9\x6e\x47\x88\x8f\x57\x78\xe0\x05\xa5\xa9\xe4\xd8\x37\x89\x19\x7f\x64\xed\xeb\xd9\x1d\x38\xfc\x77\x94\x74\x86\x55\xd5\x62\x29\x56\xec\x7b\xe4\xfb\x75\xce\x1d\xac\x23\x3e\xcd\xd4\x54\x13\x7b\xf7\x76\xb3\x31\xc4\xa4\xb9\xa9\x36\x55\x55\x55\x8b\x35\x28\x4f\x4d\x55\x3f\x3c\xec\x26\xf6\xad\xeb\xf6\x6f\xbf\xaa\x57\xe3\x44\xca\x50\x6a\xaa\xfa\xee\xcd\x4f\xbf\xfe\xf8\xfb\x1f\xbf\xfd\xfc\xf4\xc6\x7d\xbd\xd9\xa4\xe2\x28\x37\x2b\x6c\x5b\x51\x4a\x71\xc5\xb5\x8f\x6f\xba\xdd\xd5\xfe\xbe\x3e\x1b\xf2\xc9\xf7\xd1\xed\x58\x8d\x4d\x55\x8b\xbd\x95\x77\xed\x4d\xb7\x17\x0a\x4a\xf4\x7d\x82\x31\x89\x72\x46\x22\x85\xc4\x56\x3b\x42\xb6\x86\x50\x8c\x8d\x12\x3d\x7a\xa1\x32\xc1\x08\x8b\x28\xe1\xa2\x3e\x7c\x28\x91\x09\x09\x85\x39\x06\x09\xad\x44\x38\xaa\x8c\x99\xed\x7a\xa4\xc0\x94\xa0\x2d\x13\x74\x14\x86\xe0\xe0\xc6\x14\xcb\x2c\x61\x84\x62\x05\xc5\xca\xd9\xcc\x30\x20\x07\x62\x65\x5d\xc6\x10\x60\x95\x8b\x23\x1c\x58\x82\x3c\xc8\xf7\x64\x30\x58\x72\x26\x13\x63\xb0\xa3\xd0\x6a\x75\x81\x92\x48\x62\x88\xc9\xc3\x0e\x49\x79\xc2\xd4\x7e\xb7\xbd\xed\x30\x25\x58\x58\x3f\xc2\x06\x31\x17\x46\x96\x38\xf4\x06\x07\x3a\x8d\x14\xe0\x54\x4f\x0e\x8e\x46\x0a\x06\xce\xc2\xd9\x70\x80\x57\xc2\x06\xcc\x48\x07\x09\x4f\xa1\xac\x9b\x65\xf2\xf0\xc4\x42\x81\x92\x44\x50\x47\x84\x98\x75\xb2\x33\x23\x8a\xfe\x4f\xd2\x0c\x87\x99\xc5\x9a\x15\xd6\xac\x0b\xcf\x85\x25\x66\xcc\x2a\x29\x8f\xd9\x6a\x2e\x89\x30\xaf\x5f\x1c\xd7\x02\x7f\x40\x12\x33\x18\xa5\x3f\x49\x64\x64\xe5\x67\x64\x12\x7a\x4d\xca\x91\x66\x89\xec\x95\x73\xc8\xb1\x24\x4d\xc8\xb3\x0a\xc8\x9c\x62\x18\x91\x8b\xe8\x31\xc3\x7b\x95\x4e\x12\x4c\x9f\x58\x2d\xfd\x62\xeb\x09\x9c\x94\x3e\xa0\xa0\x38\x1c\x55\xc2\xd1\x1a\x8a\xf8\xd8\x27\x29\xaa\xdd\x95\x7c\x95\x07\x3b\xfa\xc4\x14\x0c\x99\x67\x84\xe8\xa3\x39\xc1\xd8\x23\x16\x7e\x61\xe1\x9d\xa0\x24\xf7\x18\x62\x5c\x5a\xca\x96\x1d\x81\x55\xbf\xec\x67\x30\x26\x41\xca\xc8\x3d\xd2\x8a\x92\x2f\x7c\xce\x89\xe6\x14\xf5\x33\x3f\xe7\x5a\x66\x3e\x39\x7a\x19\xe4\x4c\xda\x2a\xd7\x54\xf5\xd7\xed\xe3\xbb\xb6\x6d\xf2\xac\x34\x35\x5d\xd7\x5d\xbd\x7b\x9e\x48\x53\xd5\x6d\xf3\xbe\xbb\x5c\x5a\x43\x81\xed\x60\x57\xad\x08\xe5\x18\xfd\xa8\xa3\x8b\x09\x13\xd9\x71\x62\x4c\x89\x06\x58\x73\x61\x42\x0c\xa3\xa1\xac\xb1\x08\x0f\x31\x08\xed\xac\x3e\x60\x88\xba\x64\xb8\xa8\x0c\x7c\x2c\x99\xe2\x71\xe1\x40\xb6\x7f\x5d\xfa\x91\xf4\x53\xe0\x60\x95\x46\x62\x2c\xaa\xc6\x51\xb9\x42\xf8\x68\x0d\x4f\xf2\xfd\x25\x20\x1d\x43\x66\x15\x78\x97\x39\xd9\xb0\x68\xef\xa1\x6e\x1f\x1f\xea\xee\xea\xa1\x7e\x81\x09\xc5\xf7\x4f\x91\xef\xad\xfc\xb2\xfd\x76\xfb\xfd\x0f\xdb\x5f\xba\xbf\x6f\xbf\xb9\xfd\xe7\x82\x35\x34\xa8\xe2\xf8\x49\xee\xcb\xca\xac\x12\x37\x55\x7d\xae\xdd\xb2\x28\x2c\x2d\xbd\xfb\x7c\xf1\x34\x21\xaa\xb6\xdb\xbc\x36\x0c\xee\x70\xff\x3f\xd1\xee\x4a\x5a\x0a\x2c\x06\x9e\x45\x96\x7b\x4c\x7c\xfe\x19\x2d\x43\x4f\x29\x7a\x92\xcd\xcd\x4d\xfb\x58\x7d\xd1\x5d\x7f\x7e\xc3\x7b\x0a\xbc\xce\xaa\xed\x76\x77\xbd\xdf\x6e\x5f\x21\xc2\x7f\x73\x6c\x77\xbd\xb4\xfd\xdf\x00\x00\x00\xff\xff\x14\x2c\xef\x1d\x1b\x05\x00\x00")
func runtimeSyntaxHtml5YamlBytes() ([]byte, error) {
return bindataRead(

View file

@ -1,7 +1,7 @@
filetype: html4
detect:
filename: "\\.htm[l]?$"
filename: "\\.htm[l]?4$"
header: "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN|http://www.w3.org/TR/html4/strict.dtd\">"
rules:

View file

@ -1,7 +1,7 @@
filetype: html5
detect:
filename: "\\.htm[l]?$"
filename: "\\.htm[l]?5$"
header: "<!DOCTYPE html5>"
rules: