]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags.
authorJuri Linkov <juri@linkov.net>
Sat, 11 Jan 2025 17:39:56 +0000 (19:39 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 12 Jan 2025 14:58:35 +0000 (15:58 +0100)
(tsx-ts--s-p-query): Bind 'jsx_opening_element' and
'jsx_closing_element' to @jsx to be able to use the < and > syntax
for angle brackets in 'tsx-ts--syntax-propertize-captures' (bug#73978).

(cherry picked from commit fafcc8458e805e5c7d7785aa7e943bacfadcf79d)

lisp/progmodes/typescript-ts-mode.el

index ac753ed426696f089feeb10df8d9ed92516040ec..9b2964c5faf03c93a0dad30a4be912d670673b43 100644 (file)
@@ -658,7 +658,9 @@ at least 3 (which is the default value)."
   (when (treesit-available-p)
     (treesit-query-compile 'tsx
                            '(((regex pattern: (regex_pattern) @regexp))
-                             ((jsx_text) @jsx)))))
+                             ((jsx_text) @jsx)
+                             ((jsx_opening_element) @jsx)
+                             ((jsx_closing_element) @jsx)))))
 
 (defun typescript-ts--syntax-propertize (beg end)
   (let ((captures (treesit-query-capture 'typescript typescript-ts--s-p-query beg end)))