]> luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/python-repl.js
Initial commit.
[flow-web.git] / static / highlight / es / languages / python-repl.js
1 /*! `python-repl` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar = (function () {
3 'use strict';
4
5 /*
6 Language: Python REPL
7 Requires: python.js
8 Author: Josh Goebel <hello@joshgoebel.com>
9 Category: common
10 */
11
12 function pythonRepl(hljs) {
13 return {
14 aliases: [ 'pycon' ],
15 contains: [
16 {
17 className: 'meta.prompt',
18 starts: {
19 // a space separates the REPL prefix from the actual code
20 // this is purely for cleaner HTML output
21 end: / |$/,
22 starts: {
23 end: '$',
24 subLanguage: 'python'
25 }
26 },
27 variants: [
28 { begin: /^>>>(?=[ ]|$)/ },
29 { begin: /^\.\.\.(?=[ ]|$)/ }
30 ]
31 }
32 ]
33 };
34 }
35
36 return pythonRepl;
37
38 })();
39 ;
40 export default hljsGrammar;