MagicPython icon indicating copy to clipboard operation
MagicPython copied to clipboard

Multiline string in Python Console is not highlighted properly

Open ghost opened this issue 7 years ago • 3 comments
trafficstars

  • Editor name and version: Atom 1.27.1 & GitHub
  • Platform: Ubuntu
  • Color scheme: One Dark
  • MagicPython version: 1.0.12
  • A sreenshot: 2
  • 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: 3

ghost avatar Jun 03 '18 00:06 ghost

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
... ''')

1st1 avatar Jun 03 '18 00:06 1st1

But GitHub uses MagicPython to highlight "pycon": 4

And MagicPython provides "python-console.cson": https://github.com/MagicStack/MagicPython/blob/935abefebfd4a75fe5741a99de0b51a7542efb5b/grammars/python-console.cson#L33

ghost avatar Jun 03 '18 01:06 ghost

Hm, OK, we'll take a look :)

1st1 avatar Jun 03 '18 01:06 1st1