Fix treesit-font-lock-level in python-ts-mode

Now that 'treesit-font-lock-level' can be a number or a list, it
should be handled using 'treesit--compute-font-lock-level'.

* lisp/progmodes/python.el (python--treesit-fontify-string):
Apply 'treesit--compute-font-lock-level' to
'treesit-font-lock-level'.
This commit is contained in:
Vincenzo Pupillo 2024-12-17 12:14:29 +01:00 committed by Yuan Fu
parent 69facd33a8
commit 7873642074
No known key found for this signature in database
GPG key ID: 56E19BC57664A442

View file

@ -1108,7 +1108,8 @@ fontified."
(ignore-interpolation (not
(seq-some
(lambda (feats) (memq 'string-interpolation feats))
(seq-take treesit-font-lock-feature-list treesit-font-lock-level))))
(seq-take treesit-font-lock-feature-list
(treesit--compute-font-lock-level treesit-font-lock-level)))))
;; If interpolation is enabled, highlight only
;; string_start/string_content/string_end children. Do not
;; touch interpolation node that can occur inside of the