]> git.eshelyaron.com Git - emacs.git/commitdiff
python-ts-mode: Fix single-quote string fontification
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 26 Feb 2023 01:09:29 +0000 (03:09 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 26 Feb 2023 01:12:34 +0000 (03:12 +0200)
* lisp/progmodes/python.el (python--treesit-fontify-string):
Look for ', not just ", as opening delimiter (bug#61796).

lisp/progmodes/python.el

index 8220e3086fd146baee3b4bed27ddb44fb24b6408..5aab31c3ea81bd181513a070ba93ab547b95098e 100644 (file)
@@ -1070,7 +1070,7 @@ fontified."
     ;; Don't highlight string prefixes like f/r/b.
     (save-excursion
       (goto-char string-beg)
-      (when (search-forward "\"" string-end t)
+      (when (re-search-forward "[\"']" string-end t)
         (setq string-beg (match-beginning 0))))
     (treesit-fontify-with-override
      string-beg string-end face override start end)))