mirror of
https://github.com/ralsina/tartrazine.git
synced 2024-11-13 23:12:24 +00:00
Merge pull request #7 from smola/saltstack
fix .sls disambiguation (Scheme/SaltStack).
This commit is contained in:
commit
2f971ef00d
10
content.go
10
content.go
@ -402,13 +402,10 @@ var matchers = map[string]languageMatcher{
|
|||||||
return OtherLanguage, false
|
return OtherLanguage, false
|
||||||
},
|
},
|
||||||
".sls": func(i []byte) (string, bool) {
|
".sls": func(i []byte) (string, bool) {
|
||||||
if substring.BytesRegexp("## |@no-lib-strip@").Match(i) {
|
if schemeMatcher.Match(i) {
|
||||||
return "World of Warcraft Addon Data", true
|
return "Scheme", true
|
||||||
} else if substring.BytesRegexp("(contentsline|defcounter|beamer|boolfalse)").Match(i) {
|
|
||||||
return "TeX", true
|
|
||||||
}
|
}
|
||||||
|
return "SaltStack", false
|
||||||
return OtherLanguage, false
|
|
||||||
},
|
},
|
||||||
".sql": func(i []byte) (string, bool) {
|
".sql": func(i []byte) (string, bool) {
|
||||||
if pgSQLMatcher.Match(i) {
|
if pgSQLMatcher.Match(i) {
|
||||||
@ -484,4 +481,5 @@ var (
|
|||||||
substring.BytesRegexp(`(?i)\$\$PLSQL_|XMLTYPE|sysdate|systimestamp|\.nextval|connect by|AUTHID (DEFINER|CURRENT_USER)`),
|
substring.BytesRegexp(`(?i)\$\$PLSQL_|XMLTYPE|sysdate|systimestamp|\.nextval|connect by|AUTHID (DEFINER|CURRENT_USER)`),
|
||||||
substring.BytesRegexp(`(?i)constructor\W+function`),
|
substring.BytesRegexp(`(?i)constructor\W+function`),
|
||||||
)
|
)
|
||||||
|
schemeMatcher = substring.BytesRegexp(`(?m)\A(^\s*;;.*$)*\s*\(`)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user