File tree Expand file tree Collapse file tree 1 file changed +29
-8
lines changed Expand file tree Collapse file tree 1 file changed +29
-8
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,33 @@ export default function(hljs) {
25
25
IDENT_RE ,
26
26
regex . lookahead ( / \s * \( / ) )
27
27
} ;
28
+ const META_STRING = {
29
+ className : 'string' ,
30
+ begin : / " / ,
31
+ end : / " / ,
32
+ contains : [ hljs . BACKSLASH_ESCAPE ]
33
+ } ;
34
+ const META_DELIM_TREE = {
35
+ relevance : 0 ,
36
+ variants : [
37
+ {
38
+ begin : / \( / ,
39
+ end : / \) / ,
40
+ } ,
41
+ {
42
+ begin : / \[ / ,
43
+ end : / \] / ,
44
+ } ,
45
+ {
46
+ begin : / \{ / ,
47
+ end : / \} / ,
48
+ } ,
49
+ ] ,
50
+ contains : [
51
+ 'self' ,
52
+ META_STRING ,
53
+ ]
54
+ } ;
28
55
const NUMBER_SUFFIX = '([ui](8|16|32|64|128|size)|f(32|64))\?' ;
29
56
const KEYWORDS = [
30
57
"abstract" ,
@@ -246,14 +273,8 @@ export default function(hljs) {
246
273
begin : '#!?\\[' ,
247
274
end : '\\]' ,
248
275
contains : [
249
- {
250
- className : 'string' ,
251
- begin : / " / ,
252
- end : / " / ,
253
- contains : [
254
- hljs . BACKSLASH_ESCAPE
255
- ]
256
- }
276
+ META_STRING ,
277
+ META_DELIM_TREE ,
257
278
]
258
279
} ,
259
280
{
You can’t perform that action at this time.
0 commit comments