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) {
2525 IDENT_RE ,
2626 regex . lookahead ( / \s * \( / ) )
2727 } ;
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+ } ;
2855 const NUMBER_SUFFIX = '([ui](8|16|32|64|128|size)|f(32|64))\?' ;
2956 const KEYWORDS = [
3057 "abstract" ,
@@ -246,14 +273,8 @@ export default function(hljs) {
246273 begin : '#!?\\[' ,
247274 end : '\\]' ,
248275 contains : [
249- {
250- className : 'string' ,
251- begin : / " / ,
252- end : / " / ,
253- contains : [
254- hljs . BACKSLASH_ESCAPE
255- ]
256- }
276+ META_STRING ,
277+ META_DELIM_TREE ,
257278 ]
258279 } ,
259280 {
You can’t perform that action at this time.
0 commit comments