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

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
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: 6826
  • Hero Points: 526
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: 2335
  • Hero Points: 132
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: 6826
  • Hero Points: 526
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.