diff options
| author | Dmitry Gutov | 2023-02-26 03:09:29 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2023-02-26 03:12:34 +0200 |
| commit | 3cae0e3d96a5436735ab34327fc5c20e0cc864ee (patch) | |
| tree | 1d6eb7bdf0071fd2f7ddc047a85945bfde2a4fbc /lisp/progmodes/python.el | |
| parent | 68d753e3712fdd91fcdc306517ced3321d07a9d1 (diff) | |
| download | emacs-3cae0e3d96a5436735ab34327fc5c20e0cc864ee.tar.gz emacs-3cae0e3d96a5436735ab34327fc5c20e0cc864ee.zip | |
python-ts-mode: Fix single-quote string fontification
* lisp/progmodes/python.el (python--treesit-fontify-string):
Look for ', not just ", as opening delimiter (bug#61796).
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 8220e3086fd..5aab31c3ea8 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1070,7 +1070,7 @@ fontified." | |||
| 1070 | ;; Don't highlight string prefixes like f/r/b. | 1070 | ;; Don't highlight string prefixes like f/r/b. |
| 1071 | (save-excursion | 1071 | (save-excursion |
| 1072 | (goto-char string-beg) | 1072 | (goto-char string-beg) |
| 1073 | (when (search-forward "\"" string-end t) | 1073 | (when (re-search-forward "[\"']" string-end t) |
| 1074 | (setq string-beg (match-beginning 0)))) | 1074 | (setq string-beg (match-beginning 0)))) |
| 1075 | (treesit-fontify-with-override | 1075 | (treesit-fontify-with-override |
| 1076 | string-beg string-end face override start end))) | 1076 | string-beg string-end face override start end))) |