73bcce88
luigser
COMPONENTS
|
1
2
3
4
5
6
7
8
9
10
11
|
(function(Prism) {
var javascript = Prism.util.clone(Prism.languages.javascript);
Prism.languages.jsx = Prism.languages.extend('markup', javascript);
Prism.languages.jsx.tag.pattern= /<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+|(\{[\w\W]*?\})))?\s*)*\/?>/i;
Prism.languages.jsx.tag.inside['attr-value'].pattern = /=[^\{](?:('|")[\w\W]*?(\1)|[^\s>]+)/i;
Prism.languages.insertBefore('inside', 'attr-value',{
'script': {
|
73bcce88
luigser
COMPONENTS
|
14
15
16
17
18
19
20
21
22
23
|
inside: {
'function' : Prism.languages.javascript.function,
'punctuation': /[={}[\];(),.:]/,
'keyword': Prism.languages.javascript.keyword
},
'alias': 'language-javascript'
}
}, Prism.languages.jsx.tag);
}(Prism));
|