diff --git a/components/prism-puppet.js b/components/prism-puppet.js index 620a60b4f2..7035ad68cd 100644 --- a/components/prism-puppet.js +++ b/components/prism-puppet.js @@ -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.