Hi, I've attached a patch fixing up this test. The difference occurred with: rf"""\x12 S \n \u1234 \U00010348 \N{Plus-Minus Sign}""" (and equivalent variants: the same string but starting with fr""", fr''', rf'''). The patch treats "{Plus-Minus Sign}" as an embedded expression within an f-string, causing it to be fontified differently (previously it was fontified the same as the rest of the string). This is invalid syntax since "Plus-Minus Sign" is not a valid expression, so I think it's the correct behaviour since it emphasises that "{Plus-Minus Sign}" will be treated as an embedded expression even though it's invalid. I hope that makes sense, thanks, Laurence On Mon, Sep 5, 2022 at 8:13 PM Lars Ingebrigtsen wrote: > Laurence Warne writes: > > > Hi, I've attached a patch which looks good to me locally using the above > examples > > and others. > > > > In addition to the above, mixed capitalizations are also covered: > > > https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals > . > > I think your patch makes sense, but it leads to failures in: > > 1 unexpected results: > FAILED python-font-lock-escape-sequence-multiline-string > > Could you have a look at that and possibly adjust the test too (if it's > the test that's wrong here)? > >