]> git.lizzy.rs Git - micro.git/commitdiff
Improve some more region highlighting
authorZachary Yedidia <zyedidia@gmail.com>
Tue, 28 Mar 2017 21:18:06 +0000 (17:18 -0400)
committerZachary Yedidia <zyedidia@gmail.com>
Tue, 28 Mar 2017 21:18:06 +0000 (17:18 -0400)
cmd/micro/highlight/highlighter.go
cmd/micro/runtime.go
runtime/syntax/html.yaml

index 6d7d490ddae631ccbae23c6845111fb55e3551eb..fdc42da3805b08c8e81b793af749825e89848f3a 100644 (file)
@@ -77,7 +77,7 @@ func findIndex(regex *regexp.Regexp, skip []*regexp.Regexp, str []rune, canMatch
        if skip != nil && len(skip) > 0 {
                for _, r := range skip {
                        if r != nil {
-                               strbytes = r.ReplaceAllFunc([]byte(string(str)), func(match []byte) []byte {
+                               strbytes = r.ReplaceAllFunc(strbytes, func(match []byte) []byte {
                                        res := make([]byte, utf8.RuneCount(match))
                                        return res
                                })
index 9ffea77dca4cb55090ef09e183160e6db821a817..043b8965a25875f6da97a166180783ffe6c58412 100644 (file)
@@ -1900,7 +1900,7 @@ func runtimeSyntaxHaskellYaml() (*asset, error) {
        return a, nil
 }
 
-var _runtimeSyntaxHtmlYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x51\xdb\x4e\xf3\x30\x0c\xbe\xcf\x53\x44\xd1\xaf\x5f\x30\x69\xe3\x3e\x1b\xec\x41\xba\x22\x65\x89\xdb\x06\xdc\xa4\x8a\xdd\xa1\x21\x3f\x3c\xaa\xba\x03\x62\x20\xf0\xa5\x3f\xe7\x3b\xa5\x89\x08\x7c\x1c\xc0\xea\x8e\x7b\x54\x2a\x00\x83\x67\xab\xb4\xd6\x7a\xc2\x92\xeb\xc1\x6a\xb3\xdb\xad\x3a\xee\x2b\xac\xb7\xff\x8c\x52\x65\x44\xa0\xf9\x66\xa9\x63\x80\xc4\xb1\x89\x50\xac\x36\x9b\xd5\x62\xfb\x64\x4e\x08\x0d\xe0\xa3\x43\xab\xcd\xff\xea\x79\x5d\x55\x96\x06\xe7\xc1\xd6\x75\xbd\x58\x5f\x6e\xd8\x31\xf4\x90\xd8\x6a\x73\xe7\x90\x65\xdf\xfa\x8c\xb9\x48\x07\xb1\xed\x58\xba\x02\x8d\xa0\xdb\x03\x0a\xe6\xd4\x06\x20\x2f\x93\x27\xc9\xc9\x63\xf4\xaf\x92\x53\x93\xfd\x48\x92\x13\x66\x17\x24\xa7\x3e\x8f\x04\xf9\x00\x45\x28\xbe\x83\xd0\xe0\x92\x50\xf1\x42\x7c\x44\x10\x76\xa5\x05\x96\x29\xb2\x1c\x1c\x8e\x20\x6f\x31\x70\x77\xff\x68\xd4\xc9\x91\xcf\x89\xd8\x25\x5e\x11\x97\x98\xda\x39\xe6\x34\xc4\xae\x4c\x36\x77\xc6\x5c\x76\x90\xc2\x97\xcd\xdc\x8d\xae\xea\x33\x5f\x80\xc6\x8d\xc8\xb7\x3c\x1b\xf2\x25\x0e\x7c\x6d\xec\x4a\xb8\x79\xf8\x0e\xfb\x54\xfb\x79\x96\x3a\x26\x8f\x63\x98\xfe\xe8\xc5\x1d\xdc\xfc\xcc\xfc\x41\x7b\x6a\xe3\x07\xe9\x5b\xe8\x17\x65\x4f\x64\x94\xfa\x08\x00\x00\xff\xff\xdd\xb2\xe0\x18\x4b\x02\x00\x00")
+var _runtimeSyntaxHtmlYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x91\xc1\x8e\xd4\x30\x0c\x86\xef\x79\x8a\x28\x42\x08\x56\xa2\xdc\xb3\x03\x7b\xe0\x31\xda\x22\x79\x13\xb7\x0d\xb8\x49\x15\xbb\x83\x16\xf9\xe1\x51\xe9\x30\x33\x62\x06\xb1\x3e\xfa\x77\xf2\xfd\xfe\x3d\x24\x42\x79\x59\xd0\xdb\x49\x66\x32\x26\xa2\x60\x10\x6f\xac\xb5\x76\xd3\x32\xcc\xe8\xad\xeb\xba\x66\x92\xb9\xa5\xfe\xe9\x8d\x33\xa6\xae\x84\xbc\xcf\x7c\xb0\x29\x62\x96\x34\x24\xac\xde\xba\x43\xf3\xf0\xf4\xd9\x9d\x14\x5e\x30\x24\x20\x6f\xdd\xdb\xf6\xeb\x63\xdb\x7a\x5e\x20\xa0\xef\xfb\xfe\xe1\xf1\x3c\x23\x20\x38\x63\x16\x6f\xdd\x3b\x20\xd1\xe7\x31\x14\x2a\x55\x27\x4c\xe3\x24\x3a\x55\x1c\x94\xe0\x19\x49\xa9\xe4\x31\x22\x07\xdd\x3c\x69\xc9\x81\x52\xf8\xae\x25\x0f\x25\xac\xac\x25\x53\x81\xa8\x25\xcf\x65\x65\x2c\x47\xac\xca\xe9\x27\x2a\x2f\x90\x95\x6b\x50\x96\x17\x42\x15\xa8\x23\x8a\x6e\x2b\xeb\x11\x68\x45\xfd\x91\xa2\x4c\xef\x3f\x39\x73\x72\x14\x4a\x66\x81\x2c\x0d\x4b\x4d\x79\xdc\xd7\xdc\x8a\x05\xea\x66\xb3\x73\xee\xdc\xc3\x1c\xff\xea\x5c\x65\xf3\xa7\xae\xff\xdc\x23\xf9\x32\x41\xfd\x9d\x6a\xd7\x35\x67\x70\xc4\x01\x56\x92\x5b\xe0\x81\x43\x4d\x8b\x5c\xa2\xbd\x90\x0f\x1f\xef\x69\x77\x3d\xa4\x1c\x68\x8d\xdb\x31\xbf\xc1\x11\xf6\x67\xaf\x61\x6f\xb1\xfd\x03\x7d\x2b\xfd\x87\x1c\x98\x9d\x31\xbf\x02\x00\x00\xff\xff\x59\x3a\xcd\x2e\x74\x02\x00\x00")
 
 func runtimeSyntaxHtmlYamlBytes() ([]byte, error) {
        return bindataRead(
index d4915c964a83e3335b9c8a3c35f12b086b3a864e..cb6873109d00e0f177d762cefdea6eef1a5a5ee2 100644 (file)
@@ -11,7 +11,8 @@ rules:
     - constant.string:
         start: "\""
         end: "\""
-        rules: []
+        rules:
+            - constant.specialChar: "\\\\."
 
     - default:
         start: "<script.*?>"