Author Topic: python f-string color coding problem with escaped braces  (Read 129 times)

rowbearto

  • Senior Community Member
  • Posts: 1875
  • Hero Points: 122
python f-string color coding problem with escaped braces
« on: April 09, 2021, 06:59:18 pm »
In a Python f-string if you want to print an actual opening curly brace one uses 2 curly braces in a row - {{

But this throws off the color coding in python.

Example attached.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5735
  • Hero Points: 458
Re: python f-string color coding problem with escaped braces
« Reply #1 on: April 09, 2021, 07:59:19 pm »
Ah..we missed that. Thanks for posting

Hot fix add for this


rowbearto

  • Senior Community Member
  • Posts: 1875
  • Hero Points: 122
Re: python f-string color coding problem with escaped braces
« Reply #2 on: April 09, 2021, 08:11:44 pm »
Thanks. It also happens when using f""" (triple quotes) as well, maybe you have the same code for handling triple quotes as single.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5735
  • Hero Points: 458
Re: python f-string color coding problem with escaped braces
« Reply #3 on: April 09, 2021, 08:21:54 pm »
It's the same problem for all the f-string definitions. I fixed them all.