File tree 1 file changed +22
-12
lines changed
1 file changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,16 @@ export default function(hljs) {
46
46
"TSIG" ,
47
47
"TXT"
48
48
] ;
49
+
50
+ const PUNCTUATION = {
51
+ scope : 'punctuation' ,
52
+ match : / \( | \) /
53
+ } ;
54
+ const STRING = {
55
+ scope : 'string' ,
56
+ begin : '"' , end : '"'
57
+ } ;
58
+
49
59
return {
50
60
name : 'DNS Zone' ,
51
61
aliases : [
@@ -55,24 +65,24 @@ export default function(hljs) {
55
65
keywords : KEYWORDS ,
56
66
contains : [
57
67
hljs . COMMENT ( ';' , '$' , { relevance : 0 } ) ,
68
+ STRING ,
58
69
{
59
- // Character strings
60
- scope : 'string' ,
61
- begin : '"' , end : '"'
62
- } ,
63
- {
64
- scope : 'string' ,
65
- begin : / T X T .+ / ,
66
- keywords : KEYWORDS
70
+ match : / T X T \s + / ,
71
+ keywords : KEYWORDS ,
72
+ contains : [
73
+ STRING ,
74
+ PUNCTUATION ,
75
+ {
76
+ match : / \S + / ,
77
+ scope : "string"
78
+ }
79
+ ]
67
80
} ,
68
81
{
69
82
className : 'meta' ,
70
83
begin : / ^ \$ ( T T L | G E N E R A T E | I N C L U D E | O R I G I N ) \b /
71
84
} ,
72
- {
73
- scope : 'punctuation' ,
74
- match : / \( | \) /
75
- } ,
85
+ PUNCTUATION ,
76
86
{
77
87
scope : 'type' ,
78
88
match : / I N | C H /
You can’t perform that action at this time.
0 commit comments