Swap out `operator` for `punctuation` (#3306)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
diff --git a/components/prism-systemd.js b/components/prism-systemd.js
index 1c48bfe..40204dd 100644
--- a/components/prism-systemd.js
+++ b/components/prism-systemd.js
@@ -68,7 +68,7 @@
}
},
- 'operator': /=/
+ 'punctuation': /=/
};
}(Prism));
diff --git a/components/prism-systemd.min.js b/components/prism-systemd.min.js
index 694cc4f..8c192ef 100644
--- a/components/prism-systemd.min.js
+++ b/components/prism-systemd.min.js
@@ -1 +1 @@
-!function(e){var t={pattern:/^[;#].*/m,greedy:!0},n='"(?:[^\r\n"\\\\]|\\\\(?:[^\r]|\r\n?))*"(?!\\S)';Prism.languages.systemd={comment:t,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp("(=[ \t]*(?!\\s))(?:"+n+'|(?=[^"\r\n]))(?:[^\\s\\\\]|[ \t]+(?:(?![ \t"])|'+n+")|\\\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;]))*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:t,quoted:{pattern:RegExp("(^|\\s)"+n),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},operator:/=/}}();
\ No newline at end of file
+!function(e){var t={pattern:/^[;#].*/m,greedy:!0},n='"(?:[^\r\n"\\\\]|\\\\(?:[^\r]|\r\n?))*"(?!\\S)';Prism.languages.systemd={comment:t,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp("(=[ \t]*(?!\\s))(?:"+n+'|(?=[^"\r\n]))(?:[^\\s\\\\]|[ \t]+(?:(?![ \t"])|'+n+")|\\\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;]))*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:t,quoted:{pattern:RegExp("(^|\\s)"+n),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}}();
\ No newline at end of file
diff --git a/tests/languages/systemd/boolean_feature.test b/tests/languages/systemd/boolean_feature.test
index a260308..743dd8e 100644
--- a/tests/languages/systemd/boolean_feature.test
+++ b/tests/languages/systemd/boolean_feature.test
@@ -9,37 +9,37 @@ foo=no
[
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
["boolean", "on"]
]],
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
["boolean", "true"]
]],
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
["boolean", "yes"]
]],
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
["boolean", "off"]
]],
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
["boolean", "false"]
]],
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
["boolean", "no"]
]]
diff --git a/tests/languages/systemd/key_feature.test b/tests/languages/systemd/key_feature.test
index cf3ffab..92d95c2 100644
--- a/tests/languages/systemd/key_feature.test
+++ b/tests/languages/systemd/key_feature.test
@@ -4,6 +4,6 @@ foo =
----------------------------------------------------
[
- ["key", "foo"], ["operator", "="],
- ["key", "foo"], ["operator", "="]
+ ["key", "foo"], ["punctuation", "="],
+ ["key", "foo"], ["punctuation", "="]
]
diff --git a/tests/languages/systemd/value_feature.test b/tests/languages/systemd/value_feature.test
index acdac05..aa9bac6 100644
--- a/tests/languages/systemd/value_feature.test
+++ b/tests/languages/systemd/value_feature.test
@@ -13,10 +13,10 @@ foo=value 3\
----------------------------------------------------
[
- ["key", "foo"], ["operator", "="], ["value", ["value 2"]],
+ ["key", "foo"], ["punctuation", "="], ["value", ["value 2"]],
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
["quoted", "\"something\""],
["quoted", "\"some thing\""],
@@ -24,7 +24,7 @@ foo=value 3\
]],
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
["quoted", "\"something\""],
["quoted", "\"some thing\""],
@@ -32,14 +32,14 @@ foo=value 3\
]],
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
"value 2 ", ["punctuation", "\\"],
"\r\n value 2 continued"
]],
["key", "foo"],
- ["operator", "="],
+ ["punctuation", "="],
["value", [
"value 3", ["punctuation", "\\"],
["comment", "# this line is ignored"],