Commit 2eb89e15f7147118421b97d67295b6d70fe88471

Wei Ting 2022-01-24T19:23:28

Swap out `operator` for `punctuation` (#3306)

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"],