8000 Fixed patterns which can match the empty string (#1775) · PrismJS/prism@86dd3e4 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 86dd3e4

Browse files
Fixed patterns which can match the empty string (#1775)
This changes patterns which match the empty string to always match at least one character.
1 parent c9762c6 commit 86dd3e4

8 files changed

+12
-12
lines changed

components/prism-fsharp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Prism.languages.insertBefore('fsharp', 'string', {
5959
lookbehind: true
6060
},
6161
'annotation-content': {
62-
pattern: /[\s\S]*/,
62+
pattern: /[\s\S]+/,
6363
inside: Prism.languages.fsharp
6464
}
6565
}

components/prism-fsharp.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/prism-hpkp.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
Prism.languages.hpkp = {
8-
'directive': {
8+
'directive': {
99
pattern: /\b(?:(?:includeSubDomains|preload|strict)(?: |;)|pin-sha256="[a-zA-Z\d+=/]+"|(?:max-age|report-uri)=|report-to )/,
1010
alias: 'keyword'
1111
},
@@ -14,7 +14,7 @@ Prism.languages.hpkp = {
1414
alias: 'selector'
1515
},
1616
'unsafe': {
17-
pattern: /\d{0,6}/,
17+
pattern: /\d{1,6}/,
1818
alias: 'function'
1919
}
20-
};
20+
};

components/prism-hpkp.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/prism-hsts.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
Prism.languages.hsts = {
8-
'directive': {
8+
'directive': {
99
pattern: /\b(?:max-age=|includeSubDomains|preload)/,
1010
alias: 'keyword'
1111
},
@@ -14,7 +14,7 @@ Prism.languages.hsts = {
1414
alias: 'selector'
1515
},
1616
'unsafe': {
17-
pattern: /\d{0,7}/,
17+
pattern: /\d{1,7}/,
1818
alias: 'function'
1919
}
20-
};
20+
};

components/prism-hsts.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/prism-twig.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Prism.languages.twig = {
1313
'rd': {
1414
pattern: /-?(?:%\}|\}\})$/,
1515
inside: {
16-
'punctuation': /.*/
16+
'punctuation': /.+/
1717
}
1818
},
1919
'string': {

components/prism-twig.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0