Skip to content

Commit 9141242

Browse files
committed
priority problem is too difficult. I need to get some helps from a copilot. :(
1 parent 064b2e5 commit 9141242

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/languages/systemd.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ export default function(hljs) {
3838
relevance: 10
3939
};
4040

41-
const VALUE_MODE = {
42-
begin: /(?==)/,
41+
const VALUE_CONTENT_MODE = {
42+
begin: /(?<==)/,
4343
end: /$/,
4444
contains: [
4545
LITERALS,
@@ -51,21 +51,22 @@ export default function(hljs) {
5151
};
5252

5353
const KEY_VALUE_PAIR = {
54-
begin: /^[A-Za-z0-9_-]+(\[[A-Za-z0-9_@.]+\])?\s*=/,
54+
begin: /^([A-Za-z0-9_-]+(\[[A-Za-z0-9_@.]+\])?)\s*(=)/,
5555
end: /$/,
56-
returnBegin: true,
5756
contains: [
5857
{
5958
className: 'attribute',
6059
begin: /^[A-Za-z0-9_-]+(\[[A-Za-z0-9_@.]+\])?/,
60+
end: /\s*=/,
61+
excludeEnd: true,
6162
relevance: 10
6263
},
6364
{
6465
className: 'operator',
6566
match: /=/,
6667
relevance: 0
6768
},
68-
VALUE_MODE
69+
VALUE_CONTENT_MODE
6970
]
7071
};
7172

0 commit comments

Comments
 (0)