Skip to content

Commit

Permalink
SCSS: Fixed exponential time failing of url pattern (#1938)
Browse files Browse the repository at this point in the history
The url pattern used to fail in exponential time for some input strings. This fixes this issue.
  • Loading branch information
RunDevelopment committed Jun 12, 2019
1 parent feb1b6f commit 4b6b6e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/prism-scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Prism.languages.scss = Prism.languages.extend('css', {
}
},
// url, compassified
'url': /(?:[-a-z]+-)*url(?=\()/i,
'url': /(?:[-a-z]+-)?url(?=\()/i,
// CSS selector regex is not appropriate for Sass
// since there can be lot more things (var, @ directive, nesting..)
// a selector must start at the end of a property or after a brace (end of other rules or nesting)
Expand Down
2 changes: 1 addition & 1 deletion components/prism-scss.min.js

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

0 comments on commit 4b6b6e8

Please sign in to comment.