diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index dca0936c826..de1c6f551c4 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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