Compare commits
14 Commits
Author | SHA1 | Date |
---|---|---|
cn | a3f374d1aa | |
cn | 4dcaaa2215 | |
cn | 17de36de6a | |
cn | 850310d9aa | |
cn | ba4ff2d73a | |
cn | 3dbb38df8b | |
cn | 1f64694e75 | |
cn | 95a07e54a5 | |
cn | 1f77d6ab0f | |
cn | c476fe63f0 | |
cn | e95220d3a9 | |
cn | 23340d3123 | |
cn | de74c1f66c | |
cn | 265e488e96 |
32
CHANGELOG.md
32
CHANGELOG.md
|
@ -1,5 +1,37 @@
|
|||
# Changelog
|
||||
|
||||
## 1.1.3 (March 16, 2018)
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
||||
- Support numeric-only TTL values
|
||||
|
||||
## 1.1.2 (February 21, 2018)
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
||||
- Add package keywords
|
||||
|
||||
## 1.1.1 (January 29, 2018)
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
||||
- Make resource record class (like `IN`) optional
|
||||
|
||||
## 1.1.0 (November 26, 2017)
|
||||
|
||||
NEW FEATURES:
|
||||
|
||||
- Support toggling comments
|
||||
- Support `CH` resource record class in addition to `IN`
|
||||
- Support `"..."` strings correctly in resource data
|
||||
- Support `\X` escape sequences in resource data
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
||||
- Add example zone file using many possibilities offered by RFC 1035 syntax (even if this package does not highlight it correctly)
|
||||
- Add installation instructions and screenshot
|
||||
|
||||
## 1.0.0 (November 11, 2017)
|
||||
|
||||
NEW FEATURES:
|
||||
|
|
16
README.md
16
README.md
|
@ -2,6 +2,22 @@
|
|||
|
||||
Adds basic syntax highlighting based on the [Sublime Text package](https://github.com/sixty4k/st2-zonefile) to zone files in Atom.
|
||||
|
||||
![Screenshot](/screenshot.png?raw=true)
|
||||
|
||||
## Installation
|
||||
|
||||
Available as [Atom package](https://atom.io/packages/language-zonefile):
|
||||
|
||||
```
|
||||
apm install language-zonefile
|
||||
```
|
||||
|
||||
Or directly via git:
|
||||
|
||||
```
|
||||
git clone https://github.com/cmur2/language-zonefile.git ~/.atom/packages/language-zonefile
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
language-zonefile is licensed under the MIT License. See LICENSE for more information.
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
$TTL 86400 ; 24 hours, could have been written as 24h or 1d
|
||||
$ORIGIN example.com.
|
||||
|
||||
@ 7d IN SOA ns1.example.com. hostmaster.example.com. (
|
||||
2017010101 ; serial
|
||||
3H ; refresh
|
||||
15 ; retry
|
||||
1W ; expire
|
||||
5m ; minimum
|
||||
)
|
||||
|
||||
; name servers
|
||||
7D IN NS ns1.example.com. ; in the domain
|
||||
7D IN NS ns2.example.org. ; external to domain
|
||||
|
||||
; services and hosts
|
||||
ns1 IN A 192.168.0.1 ; name server IPv4 address
|
||||
ns1 IN AAAA 2001:0db8::1 ; name server IPv6 address
|
||||
www IN A 192.168.0.2 ; web server
|
||||
ftp IN CNAME www.example.com. ; ftp alias (absolute)
|
||||
xmpp IN CNAME www ; xmpp alias (relative)
|
||||
dyn 60 IN CNAME www ; dynamic alias (TTL in seconds)
|
||||
|
||||
; mail
|
||||
IN MX 10 mail.example.org. ; external mail provider
|
||||
mail._domainkey IN TXT "v=DKIM1\; h=sha256\; k=rsa\; s=email\; p=loooooooooog"
|
||||
|
||||
; CAA records for Let's Encrypt, one in RFC 3597 syntax
|
||||
IN CAA 0 issue "letsencrypt.org"
|
||||
; IN CAA 0 iodef "mailto:abuse@example.com"
|
||||
IN TYPE257 \# 31 0005696F6465666D61696C746F3A6162757365406578616D706C652E636F6D
|
||||
|
||||
; xmpp
|
||||
_jabber._tcp IN SRV 5 0 5269 xmpp
|
||||
|
||||
; special
|
||||
xx.lcs.mit.edu. CH A mit.edu. 2420
|
|
@ -4,55 +4,80 @@ fileTypes: [
|
|||
'zone'
|
||||
'db'
|
||||
]
|
||||
|
||||
patterns: [
|
||||
{
|
||||
match: ';.*'
|
||||
name: 'comment.line.semicolon.zonefile'
|
||||
}
|
||||
{
|
||||
match: '@'
|
||||
name: 'keyword.directive.zonefile'
|
||||
}
|
||||
{
|
||||
match: '\\$(ORIGIN|origin|TTL|ttl|INCLUDE|include)\\s*([^;]*)(;.*)?'
|
||||
name: 'keyword.directive.zonefile'
|
||||
captures:
|
||||
'2':
|
||||
name: 'variable.other.directive.zonefile'
|
||||
'3':
|
||||
name: 'comment.line.semicolon.zonefile'
|
||||
}
|
||||
{
|
||||
match: '\\d+(H|h|D|d|W|w|M|m|Y|y)'
|
||||
name: 'variable.other.timeunit.zonefile'
|
||||
}
|
||||
{
|
||||
begin: '([A-Za-z0-9_.-]*)\\s+(?:([0-9A-Za-z]*)\\s+)?([I|i][N|n]\\s+[A-Za-z0-9]+)\\s+(.*)\\('
|
||||
beginCaptures:
|
||||
'2':
|
||||
name: 'variable.other.timeunit.zonefile'
|
||||
'3':
|
||||
name: 'keyword.resourcetype.zonefile'
|
||||
'4':
|
||||
name: 'string.quoted.single.resource.address.zonefile'
|
||||
end: '\\)'
|
||||
name: 'string.quoted.single.address.zonefile'
|
||||
{include: '#comments'}
|
||||
{include: '#entries'}
|
||||
]
|
||||
|
||||
repository:
|
||||
comments:
|
||||
patterns: [
|
||||
{
|
||||
match: ';.*'
|
||||
name: 'comment.line.semicolon.zonefile'
|
||||
}
|
||||
]
|
||||
}
|
||||
{
|
||||
match: '([A-Za-z0-9_.-]*)\\s+(?:([0-9A-Za-z]*)\\s+)?([I|i][N|n]\\s+[A-Za-z0-9]+)\\s+(.*)'
|
||||
name: 'string.quoted.single.address.zonefile'
|
||||
captures:
|
||||
'2':
|
||||
name: 'variable.other.timeunit.zonefile'
|
||||
'3':
|
||||
name: 'keyword.resourcetype.zonefile'
|
||||
'4':
|
||||
name: 'string.quoted.single.resource.address.zonefile'
|
||||
}
|
||||
]
|
||||
entries:
|
||||
patterns: [
|
||||
{
|
||||
match: '(\\$(ORIGIN|origin|TTL|ttl|INCLUDE|include))\\s+([^;]+)'
|
||||
captures:
|
||||
'1':
|
||||
name: 'keyword.entry.control.zonefile'
|
||||
'3':
|
||||
name: 'variable.other.entry.control.zonefile'
|
||||
}
|
||||
{
|
||||
begin: '((@)|([A-Za-z0-9_.-]+))?(\\s+\\d+[A-Za-z]*)?(\\s+IN|in|CH|ch)?\\s+(\\w+)\\s+'
|
||||
beginCaptures:
|
||||
'2':
|
||||
name: 'keyword.entry.resource.record.zonefile'
|
||||
'3':
|
||||
name: 'string.unquoted.domain.name.zonefile'
|
||||
'4':
|
||||
name: 'variable.other.ttl.zonefile'
|
||||
'5':
|
||||
name: 'keyword.class.zonefile'
|
||||
'6':
|
||||
name: 'keyword.resource.type.zonefile'
|
||||
end: '\\n'
|
||||
name: 'meta.entry.resource.record.zonefile'
|
||||
patterns: [
|
||||
{include: '#comments'}
|
||||
{include: '#rdata'}
|
||||
]
|
||||
}
|
||||
]
|
||||
rdata:
|
||||
patterns: [
|
||||
{
|
||||
match: '(\\\\([^\\d]|[\\d]{3,3}))'
|
||||
name: 'string.unquoted.escape.zonefile'
|
||||
captures:
|
||||
'1':
|
||||
name: 'constant.string.unquoted.escape.zonefile'
|
||||
}
|
||||
{
|
||||
match: '"[^"]*"'
|
||||
name: 'string.quoted.double.resource.data.zonefile'
|
||||
}
|
||||
{
|
||||
begin: '(\\()'
|
||||
beginCaptures:
|
||||
'1':
|
||||
name: 'string.unquoted.resource.data.zonefile'
|
||||
end: '(\\))'
|
||||
endCaptures:
|
||||
'1':
|
||||
name: 'string.unquoted.resource.data.zonefile'
|
||||
patterns: [
|
||||
{include: '#comments'}
|
||||
{include: '#rdata'}
|
||||
]
|
||||
}
|
||||
{
|
||||
match: '[^\\s]+?'
|
||||
name: 'string.unquoted.resource.data.zonefile'
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
{
|
||||
"name": "language-zonefile",
|
||||
"description": "Bind Zone File language support in Atom",
|
||||
"version": "1.0.0",
|
||||
"version": "1.1.3",
|
||||
"keywords": [
|
||||
"language",
|
||||
"grammar",
|
||||
"dns",
|
||||
"zonefile",
|
||||
"bind"
|
||||
],
|
||||
"engines": {
|
||||
"atom": "*"
|
||||
},
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
|
@ -0,0 +1,3 @@
|
|||
'.source.zonefile':
|
||||
editor:
|
||||
commentStart: '; '
|
Loading…
Reference in New Issue