Skip to content

Commit 386cc48

Browse files
DeeUnderscorealecthomas
authored andcommitted
toml: allow - in keys
1 parent 72795c5 commit 386cc48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lexers/t/toml.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func tomlRules() Rules {
2727
{`"(\\\\|\\"|[^"])*"`, StringDouble, nil},
2828
{`'(\\\\|\\'|[^'])*'`, StringSingle, nil},
2929
{`[.,=\[\]{}]`, Punctuation, nil},
30-
{`[^\W\d]\w*`, NameOther, nil},
30+
{`[A-Za-z0-9_-]+`, NameOther, nil},
3131
},
3232
}
3333
}

0 commit comments

Comments
 (0)