mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-08-28 04:46:30 -04:00
Fix syncat example
This commit is contained in:
+2
-3
@@ -11,15 +11,14 @@ import (
|
||||
"github.com/zyedidia/highlight"
|
||||
)
|
||||
|
||||
var defs []*highlight.Def
|
||||
|
||||
func main() {
|
||||
var defs []*highlight.Def
|
||||
gopath := os.Getenv("GOPATH")
|
||||
files, _ := ioutil.ReadDir(gopath + "/src/github.com/zyedidia/highlight/syntax_files")
|
||||
|
||||
for _, f := range files {
|
||||
if strings.HasSuffix(f.Name(), ".yaml") {
|
||||
input, _ := ioutil.ReadFile(gopath + "/src/github.com/zyedidia/highlight/syntax_files")
|
||||
input, _ := ioutil.ReadFile(gopath + "/src/github.com/zyedidia/highlight/syntax_files/" + f.Name())
|
||||
d, err := highlight.ParseDef(input)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
filetype: go
|
||||
|
||||
detect:
|
||||
filename: "\\.go$"
|
||||
filename: "\\.go$"
|
||||
|
||||
rules:
|
||||
- statement: "\\b(break|case|continue|default|else|for|go|goto|if|range|return|switch)\\b"
|
||||
|
||||
Reference in New Issue
Block a user