main
Last change
on this file since 65b6638 was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
687 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | /*
|
---|
| 2 | Language: Python REPL
|
---|
| 3 | Requires: python.js
|
---|
| 4 | Author: Josh Goebel <hello@joshgoebel.com>
|
---|
| 5 | Category: common
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | function pythonRepl(hljs) {
|
---|
| 9 | return {
|
---|
| 10 | aliases: [ 'pycon' ],
|
---|
| 11 | contains: [
|
---|
| 12 | {
|
---|
| 13 | className: 'meta',
|
---|
| 14 | starts: {
|
---|
| 15 | // a space separates the REPL prefix from the actual code
|
---|
| 16 | // this is purely for cleaner HTML output
|
---|
| 17 | end: / |$/,
|
---|
| 18 | starts: {
|
---|
| 19 | end: '$',
|
---|
| 20 | subLanguage: 'python'
|
---|
| 21 | }
|
---|
| 22 | },
|
---|
| 23 | variants: [
|
---|
| 24 | {
|
---|
| 25 | begin: /^>>>(?=[ ]|$)/
|
---|
| 26 | },
|
---|
| 27 | {
|
---|
| 28 | begin: /^\.\.\.(?=[ ]|$)/
|
---|
| 29 | }
|
---|
| 30 | ]
|
---|
| 31 | }
|
---|
| 32 | ]
|
---|
| 33 | };
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | module.exports = pythonRepl;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.