Add "text" as a thing in tsx-ts-mode
authorKohei Tsuruta <seventhepg@gmail.com>
Tue, 7 Jan 2025 15:36:14 +0000 (07:36 -0800)
committerJuri Linkov <juri@linkov.net>
Thu, 9 Jan 2025 07:50:21 +0000 (09:50 +0200)
* lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode):
Add definition of "text" (bug#75422).

Copyright-paperwork-exempt: yes

lisp/progmodes/typescript-ts-mode.el

index 4a38d1da596b229d1bb2deafb0ae8ac819dac8c4..0ffcb144771a5e668cf5989d689ac9990ee2a3ca 100644 (file)
@@ -564,7 +564,9 @@ at least 3 (which is the default value)."
                    (sentence ,(regexp-opt
                                (append typescript-ts-mode--sentence-nodes
                                        '("jsx_element"
-                                         "jsx_self_closing_element")))))))
+                                         "jsx_self_closing_element"))))
+                   (text ,(regexp-opt '("comment"
+                                        "template_string"))))))
 
     ;; Font-lock.
     (setq-local treesit-font-lock-settings