Skip to content

Commit

Permalink
Fixed patterns which can match the empty string (#1775)
Browse files Browse the repository at this point in the history
This changes patterns which match the empty string to always match at least one character.
  • Loading branch information
RunDevelopment authored Mar 6, 2019
1 parent c9762c6 commit 86dd3e4
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion components/prism-fsharp.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Prism.languages.insertBefore('fsharp', 'string', {
lookbehind: true
},
'annotation-content': {
pattern: /[\s\S]*/,
pattern: /[\s\S]+/,
inside: Prism.languages.fsharp
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/prism-fsharp.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions components/prism-hpkp.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

Prism.languages.hpkp = {
'directive': {
'directive': {
pattern: /\b(?:(?:includeSubDomains|preload|strict)(?: |;)|pin-sha256="[a-zA-Z\d+=/]+"|(?:max-age|report-uri)=|report-to )/,
alias: 'keyword'
},
Expand All @@ -14,7 +14,7 @@ Prism.languages.hpkp = {
alias: 'selector'
},
'unsafe': {
pattern: /\d{0,6}/,
pattern: /\d{1,6}/,
alias: 'function'
}
};
};
2 changes: 1 addition & 1 deletion components/prism-hpkp.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions components/prism-hsts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

Prism.languages.hsts = {
'directive': {
'directive': {
pattern: /\b(?:max-age=|includeSubDomains|preload)/,
alias: 'keyword'
},
Expand All @@ -14,7 +14,7 @@ Prism.languages.hsts = {
alias: 'selector'
},
'unsafe': {
pattern: /\d{0,7}/,
pattern: /\d{1,7}/,
alias: 'function'
}
};
};
2 changes: 1 addition & 1 deletion components/prism-hsts.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/prism-twig.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Prism.languages.twig = {
'rd': {
pattern: /-?(?:%\}|\}\})$/,
inside: {
'punctuation': /.*/
'punctuation': /.+/
}
},
'string': {
Expand Down
2 changes: 1 addition & 1 deletion components/prism-twig.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 86dd3e4

Please sign in to comment.