MagicStack / MagicPython

Cutting edge Python syntax highlighter for Sublime Text, Atom and Visual Studio Code. Used by GitHub to highlight your Python code!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.format() keys with spaces don't highlight properly

Cavernosa opened this issue · comments

not sure if it belongs here but
If you have a dict key with spaces in its name, 'fried eggs' for example, it thinks the format braces {} are actually a string.

  • Editor name and version: vs code 1.45.1

  • Platform: linux mint

  • Color scheme: Dark molokai

  • MagicPython version: 1.1.0

  • A sreenshot:
    image
    image

  • 5-10 lines of surrounding code:
    action = int(input('text' '\n text {bread[0]}' '\n text {fried eggs[0]})' '\n text {pancakes[0]})' '\n text \n'.format_map(dt['foods'])))