]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags.
authorJuri Linkov <juri@linkov.net>
Fri, 10 Jan 2025 07:56:08 +0000 (09:56 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 11 Jan 2025 11:18:39 +0000 (12:18 +0100)
(tsx-ts--syntax-propertize-captures): For tag angle brackets
use the same syntax as in 'sgml-make-syntax-table' (bug#73978).

(cherry picked from commit c0a52efed32ddc63b26c9e1d9dd769da55d857e5)

lisp/progmodes/typescript-ts-mode.el

index 61ae8babbcefb217131539f84e5d0c4495a95893..6363b77b67fb3a7a1ccf64cefa2c59180fd40cb4 100644 (file)
@@ -690,7 +690,11 @@ at least 3 (which is the default value)."
                                      ne t)
              (put-text-property
               (match-beginning 0) (match-end 0)
-              'syntax-table (string-to-syntax ".")))))))))
+              'syntax-table (string-to-syntax
+                             (cond
+                              ((equal (match-string 0) "<") "(<")
+                              ((equal (match-string 0) ">") ")>")
+                              (t ".")))))))))))
 
 (if (treesit-ready-p 'tsx)
     (add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode)))