87f54be13a
Use the 'regexp2' library for lookahead and lookbehind in region start and end regular expressions to support things like closing quotes that aren't preceded by backslashes.
23 lines
457 B
YAML
23 lines
457 B
YAML
filetype: caddyfile
|
|
|
|
detect:
|
|
filename: "Caddyfile"
|
|
|
|
rules:
|
|
- identifier: "^\\s*\\S+(\\s|$)"
|
|
- type: "^([\\w.:/-]+,? ?)+[,{]$"
|
|
- constant.specialChar: "\\s{$"
|
|
- constant.specialChar: "^\\s*}$"
|
|
- constant.string:
|
|
start: "\""
|
|
end: "(?<!\\\\)\""
|
|
rules:
|
|
- constant.specialChar: "\\\\."
|
|
|
|
- preproc: "\\{(\\w+|\\$\\w+|%\\w+%)\\}"
|
|
- comment:
|
|
start: "#"
|
|
end: "$"
|
|
rules: []
|
|
|