use prism-tomorrow.css
This commit is contained in:
56
docs/_style/prism-master/components/prism-markup.js
Normal file
56
docs/_style/prism-master/components/prism-markup.js
Normal file
@ -0,0 +1,56 @@
|
||||
Prism.languages.markup = {
|
||||
'comment': /<!--[\s\S]*?-->/,
|
||||
'prolog': /<\?[\s\S]+?\?>/,
|
||||
'doctype': /<!DOCTYPE[\s\S]+?>/i,
|
||||
'cdata': /<!\[CDATA\[[\s\S]*?]]>/i,
|
||||
'tag': {
|
||||
pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,
|
||||
greedy: true,
|
||||
inside: {
|
||||
'tag': {
|
||||
pattern: /^<\/?[^\s>\/]+/i,
|
||||
inside: {
|
||||
'punctuation': /^<\/?/,
|
||||
'namespace': /^[^\s>\/:]+:/
|
||||
}
|
||||
},
|
||||
'attr-value': {
|
||||
pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,
|
||||
inside: {
|
||||
'punctuation': [
|
||||
/^=/,
|
||||
{
|
||||
pattern: /(^|[^\\])["']/,
|
||||
lookbehind: true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
'punctuation': /\/?>/,
|
||||
'attr-name': {
|
||||
pattern: /[^\s>\/]+/,
|
||||
inside: {
|
||||
'namespace': /^[^\s>\/:]+:/
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
'entity': /&#?[\da-z]{1,8};/i
|
||||
};
|
||||
|
||||
Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] =
|
||||
Prism.languages.markup['entity'];
|
||||
|
||||
// Plugin to make entity title show the real entity, idea by Roman Komarov
|
||||
Prism.hooks.add('wrap', function(env) {
|
||||
|
||||
if (env.type === 'entity') {
|
||||
env.attributes['title'] = env.content.replace(/&/, '&');
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.xml = Prism.languages.markup;
|
||||
Prism.languages.html = Prism.languages.markup;
|
||||
Prism.languages.mathml = Prism.languages.markup;
|
||||
Prism.languages.svg = Prism.languages.markup;
|
Reference in New Issue
Block a user