From a407dff69451b78f0f76680fe33c6f5aec62fa01 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 10 Jan 2025 09:56:08 +0200 Subject: [PATCH] * lisp/progmodes/typescript-ts-mode.el: Fix syntax of tsx tags. (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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 61ae8babbce..6363b77b67f 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -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))) -- 2.39.5