Locally add prismjs
This commit is contained in:
parent
35af792c6a
commit
6aa044cf9b
701 changed files with 35787 additions and 0 deletions
40
node_modules/prismjs/components/prism-xml-doc.js
generated
vendored
Normal file
40
node_modules/prismjs/components/prism-xml-doc.js
generated
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
(function (Prism) {
|
||||
|
||||
/**
|
||||
* If the given language is present, it will insert the given doc comment grammar token into it.
|
||||
*
|
||||
* @param {string} lang
|
||||
* @param {any} docComment
|
||||
*/
|
||||
function insertDocComment(lang, docComment) {
|
||||
if (Prism.languages[lang]) {
|
||||
Prism.languages.insertBefore(lang, 'comment', {
|
||||
'doc-comment': docComment
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var tag = Prism.languages.markup.tag;
|
||||
|
||||
var slashDocComment = {
|
||||
pattern: /\/\/\/.*/,
|
||||
greedy: true,
|
||||
alias: 'comment',
|
||||
inside: {
|
||||
'tag': tag
|
||||
}
|
||||
};
|
||||
var tickDocComment = {
|
||||
pattern: /'''.*/,
|
||||
greedy: true,
|
||||
alias: 'comment',
|
||||
inside: {
|
||||
'tag': tag
|
||||
}
|
||||
};
|
||||
|
||||
insertDocComment('csharp', slashDocComment);
|
||||
insertDocComment('fsharp', slashDocComment);
|
||||
insertDocComment('vbnet', tickDocComment);
|
||||
|
||||
}(Prism));
|
Loading…
Add table
Add a link
Reference in a new issue