mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2026-09-11 08:16:37 -04:00
Fix syntax of tsx tag angle brackets to use matching pairs
The matching characters for JSX tag angle brackets were
self-referential ('<' matched '<', and '>' matched '>') rather than
pointing at each other. Tools that check the matching character, such
as 'show-paren-mode' and the rainbow-delimiters package, therefore
treated every JSX closing '>' as a mismatched delimiter. Use the same
descriptors as 'sgml-make-syntax-table', where '<' is closed by '>'
and '>' by '<' (bug#81348).
* lisp/progmodes/typescript-ts-mode.el
(tsx-ts--syntax-propertize-captures): Give '<' the syntax descriptor
"(>" and '>' the descriptor ")<".
Copyright-paperwork-exempt: yes
This commit is contained in:
parent
43ff22a0d1
commit
7d01f8f7a4
|
|
@ -860,8 +860,8 @@ at least 3 (which is the default value)."
|
|||
(match-beginning 0) (match-end 0)
|
||||
'syntax-table (string-to-syntax
|
||||
(cond
|
||||
((equal (match-string 0) "<") "(<")
|
||||
((equal (match-string 0) ">") ")>")
|
||||
((equal (match-string 0) "<") "(>")
|
||||
((equal (match-string 0) ">") ")<")
|
||||
(t ".")))))))))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
|||
Loading…
Reference in a new issue