Fix string fontification on python-ts-mode (bug#60599)
* lisp/progmodes/python.el: (python--treesit-fontify-string): Generalize and skip anything before the first quote character.
This commit is contained in:
parent
800e15e3be
commit
e3d806b417
1 changed files with 5 additions and 2 deletions
|
@ -1067,8 +1067,11 @@ fontified."
|
|||
"expression_statement"))
|
||||
'font-lock-doc-face
|
||||
'font-lock-string-face)))
|
||||
(when (eq (char-after string-beg) ?f)
|
||||
(cl-incf string-beg))
|
||||
;; Don't highlight string prefixes like f/r/b.
|
||||
(save-excursion
|
||||
(goto-char string-beg)
|
||||
(when (search-forward "\"" string-end t)
|
||||
(setq string-beg (match-beginning 0))))
|
||||
(treesit-fontify-with-override
|
||||
string-beg string-end face override start end)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue