bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60599: 30.0.50; python treesit string highlight error


From: Yuan Fu
Subject: bug#60599: 30.0.50; python treesit string highlight error
Date: Sat, 7 Jan 2023 18:43:02 -0800

Nasy <nasyxx@gmail.com> writes:

> There are two problems:
>
> The first problem is that f-string treats expressions containing "." as
> strings rather than default and property.
>
> For example:
>
> import math
>
> # here the math highlight is font-lock-variable-name-face
> f"{math}"
>
> # but here is font-lock-string-face. It should be default for (math.) and
> font-lock-property-face for pi
> f"{math.pi}"
>
> ---------
>
> The second one is we have other prefixes for python string like "b",
> "u", "fr". The complete prefixes here:
> https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
>
> Thus, as the function python--treesit-fontify-string does not fontify
> the initial f, should it also consider other prefixes?

Thanks for the report! Both should be fixed now.

Yuan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]