mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-08-31 22:36:27 -04:00
Support initial batch of languages
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
//go:build stxDiff || stxAll
|
||||
|
||||
package syntax
|
||||
|
||||
func init() {
|
||||
syntaxMap["diff"] = &lazySyntax{init: func() []byte {
|
||||
return []byte(`filetype: diff
|
||||
|
||||
detect:
|
||||
filename: "\\.diff$"
|
||||
header: "^((---.*)|(\\+\\+\\+.*))"
|
||||
|
||||
rules:
|
||||
- statement: "(^\\+\\+\\+.*)"
|
||||
- statement: "(^---.*)"
|
||||
- type: "(^@@.*)"
|
||||
- constant.number: "(^\\+.*)"
|
||||
- preproc: "(^-.*)"`)
|
||||
}}
|
||||
}
|
||||
Reference in New Issue
Block a user