Files
chatapp/backend/static/highlight(1)/es/languages/python-repl.js
T
2025-10-11 01:52:21 +01:00

40 lines
849 B
JavaScript

/*! `python-repl` grammar compiled for Highlight.js 11.11.1 */
var hljsGrammar = (function () {
'use strict';
/*
Language: Python REPL
Requires: python.js
Author: Josh Goebel <hello@joshgoebel.com>
Category: common
*/
function pythonRepl(hljs) {
return {
aliases: [ 'pycon' ],
contains: [
{
className: 'meta.prompt',
starts: {
// a space separates the REPL prefix from the actual code
// this is purely for cleaner HTML output
end: / |$/,
starts: {
end: '$',
subLanguage: 'python'
}
},
variants: [
{ begin: /^>>>(?=[ ]|$)/ },
{ begin: /^\.\.\.(?=[ ]|$)/ }
]
}
]
};
}
return pythonRepl;
})();
;
export default hljsGrammar;