MagicPython
MagicPython copied to clipboard
Multiline string in Python Console is not highlighted properly
trafficstars
- Editor name and version: Atom 1.27.1 & GitHub
- Platform: Ubuntu
- Color scheme: One Dark
- MagicPython version: 1.0.12
- A sreenshot:

- 5-10 lines of surrounding code:
>>> lua_func = lua.eval('''
... function(a, b) -- a plus b
... return a + b
... end
... ''')
- The same code highlighted by Pygments:

The syntax on the screenshot is "pycon" (python console); MagicPython doesn't provide it. This snippet highlighted with "python" syntax:
>>> lua_func = lua.eval('''
... function(a, b) -- a plus b
... return a + b
... end
... ''')
But GitHub uses MagicPython to highlight "pycon":

And MagicPython provides "python-console.cson": https://github.com/MagicStack/MagicPython/blob/935abefebfd4a75fe5741a99de0b51a7542efb5b/grammars/python-console.cson#L33
Hm, OK, we'll take a look :)