Skip to content

Commit

Permalink
Move SCSS property definition (#1633)
Browse files Browse the repository at this point in the history
This PR cleans up the SCSS language definition a little by moving the
definition of `property` inside the `extend` object. Also remove useless `i` flag.
  • Loading branch information
RunDevelopment authored and mAAdhaTTah committed Dec 1, 2018
1 parent 86d3179 commit 0536fb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions components/prism-scss.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ Prism.languages.scss = Prism.languages.extend('css', {
'placeholder': /%[-\w]+/,
'variable': /\$[-\w]+|#\{\$[-\w]+\}/
}
},
'property': {
pattern: /(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,
inside: {
'variable': /\$[-\w]+|#\{\$[-\w]+\}/
}
}
});

Expand All @@ -43,13 +49,6 @@ Prism.languages.insertBefore('scss', 'atrule', {
]
});

Prism.languages.scss.property = {
pattern: /(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/i,
inside: {
'variable': /\$[-\w]+|#\{\$[-\w]+\}/
}
};

Prism.languages.insertBefore('scss', 'important', {
// var and interpolated vars
'variable': /\$[-\w]+|#\{\$[-\w]+\}/
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 0536fb1

Please sign in to comment.