Skip to content

Commit

Permalink
Merge pull request #978 from nfagerlund/june2016_puppet_regexes
Browse files Browse the repository at this point in the history
Puppet highlighter: Fix over-greedy regexp detection
  • Loading branch information
Golmote committed Jun 16, 2016
2 parents 500121b + b9a9de5 commit 105be25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/prism-puppet.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
'regex': {
// Must be prefixed with the keyword "node" or a non-word char
pattern: /((?:\bnode\s+|[^\s\w\\]\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,
pattern: /((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,
lookbehind: true,
inside: {
// Extended regexes must have the x flag. They can contain single-line comments.
Expand Down

0 comments on commit 105be25

Please sign in to comment.