Commit 678b621278810f296e929d6877284b19547127c0

Golmote 2017-10-22T15:14:21

.properties: Regexp optimisation

diff --git a/components/prism-properties.js b/components/prism-properties.js
index ccba919..abcfae4 100644
--- a/components/prism-properties.js
+++ b/components/prism-properties.js
@@ -1,9 +1,9 @@
 Prism.languages.properties = {
 	'comment': /^[ \t]*[#!].*$/m,
 	'attr-value': {
-		pattern: /(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+?(?: *[=:] *| ))(?:\\(?:\r\n|[\s\S])|.)+/m,
+		pattern: /(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+?(?: *[=:] *| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,
 		lookbehind: true
 	},
-	'attr-name': /^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+?(?= *[ =:]| )/m,
+	'attr-name': /^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+?(?= *[=:] *| )/m,
 	'punctuation': /[=:]/
 };
\ No newline at end of file
diff --git a/components/prism-properties.min.js b/components/prism-properties.min.js
index 818dc10..eb6f793 100644
--- a/components/prism-properties.min.js
+++ b/components/prism-properties.min.js
@@ -1 +1 @@
-Prism.languages.properties={comment:/^[ \t]*[#!].*$/m,"attr-value":{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+?(?: *[=:] *| ))(?:\\(?:\r\n|[\s\S])|.)+/m,lookbehind:!0},"attr-name":/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+?(?= *[ =:]| )/m,punctuation:/[=:]/};
\ No newline at end of file
+Prism.languages.properties={comment:/^[ \t]*[#!].*$/m,"attr-value":{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+?(?: *[=:] *| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,lookbehind:!0},"attr-name":/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+?(?= *[=:] *| )/m,punctuation:/[=:]/};
\ No newline at end of file