Skip to content
Permalink
Browse files
nginx: Made some patterns greedy (#3230)
  • Loading branch information
RunDevelopment committed Dec 3, 2021
1 parent 8ecef30 commit 7b72e0ad2b2ab4db6a2dd150ae3280de1310871d
Showing with 4 additions and 2 deletions.
  1. +3 −1 components/prism-nginx.js
  2. +1 −1 components/prism-nginx.min.js
@@ -5,7 +5,8 @@
Prism.languages.nginx = {
'comment': {
pattern: /(^|[\s{};])#.*/,
lookbehind: true
lookbehind: true,
greedy: true
},
'directive': {
pattern: /(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,
@@ -15,6 +16,7 @@
'string': {
pattern: /((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,
lookbehind: true,
greedy: true,
inside: {
'escape': {
pattern: /\\["'\\nrt]/,

Some generated files are not rendered by default. Learn more.

0 comments on commit 7b72e0a

Please sign in to comment.