Skip to content

Commit 7ca8f53

Browse files
committed
Re-inline single-use mode definition
1 parent 2ca8fca commit 7ca8f53

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

src/languages/rust.js

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,6 @@ export default function(hljs) {
3131
end: /"/,
3232
contains: [ hljs.BACKSLASH_ESCAPE ]
3333
};
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-
};
5534
const NUMBER_SUFFIX = '([ui](8|16|32|64|128|size)|f(32|64))\?';
5635
const KEYWORDS = [
5736
"abstract",
@@ -274,7 +253,27 @@ export default function(hljs) {
274253
end: '\\]',
275254
contains: [
276255
META_STRING,
277-
META_DELIM_TREE,
256+
{
257+
relevance: 0,
258+
variants: [
259+
{
260+
begin: /\(/,
261+
end: /\)/,
262+
},
263+
{
264+
begin: /\[/,
265+
end: /\]/,
266+
},
267+
{
268+
begin: /\{/,
269+
end: /\}/,
270+
},
271+
],
272+
contains: [
273+
'self',
274+
META_STRING,
275+
]
276+
},
278277
]
279278
},
280279
{

0 commit comments

Comments
 (0)