travel/admin/node_modules/highlight.js/lib/languages/node-repl.js

38 lines
711 B
JavaScript
Raw Normal View History

2024-06-24 11:28:18 +08:00
/*
Language: Node REPL
Requires: javascript.js
Author: Marat Nagayev <nagaevmt@yandex.ru>
Category: scripting
*/
/** @type LanguageFn */
function nodeRepl(hljs) {
return {
name: 'Node REPL',
contains: [
{
className: 'meta',
starts: {
// a space separates the REPL prefix from the actual code
// this is purely for cleaner HTML output
end: / |$/,
starts: {
end: '$',
subLanguage: 'javascript'
}
},
variants: [
{
begin: /^>(?=[ ]|$)/
},
{
begin: /^\.\.\.(?=[ ]|$)/
}
]
}
]
};
}
module.exports = nodeRepl;