UNPKG
npm-polymer-elements
Version:
latest (0.0.1)
0.0.1
Polymer Elements package for npm
npm-polymer-elements
/
prism
/
plugins
/
highlight-keywords
/
prism-highlight-keywords.js
18 lines
(14 loc)
•
270 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(
function
(
){
if
(
typeof
self !==
'undefined'
&& !self.
Prism
||
typeof
global
!==
'undefined'
&& !
global
.
Prism
) {
return
; }
Prism
.
hooks
.
add
(
'wrap'
,
function
(
env
) {
if
(env.
type
!==
"keyword"
) {
return
; } env.
classes
.
push
(
'keyword-'
+ env.
content
); }); })();