]> git.eshelyaron.com Git - emacs.git/commitdiff
Swap tag and element in html-ts-mode (bug#60972)
authorTheodor Thornhill <theo@thornhill.no>
Sun, 22 Jan 2023 18:17:41 +0000 (19:17 +0100)
committerTheodor Thornhill <theo@thornhill.no>
Mon, 23 Jan 2023 12:10:26 +0000 (13:10 +0100)
* lisp/textmodes/html-ts-mode.el: New values for
'treesit-sentence-type-regexp' and 'treesit-sexp-type-regexp'.

lisp/textmodes/html-ts-mode.el

index a2d85bff7d632df0e3169a27b7848e3f54bb33e0..58dcc7d8cada5a85407c5fbe863fa34abb97e7d0 100644 (file)
@@ -106,10 +106,10 @@ Return nil if there is no name or if NODE is not a defun node."
 
   (setq-local treesit-defun-name-function #'html-ts-mode--defun-name)
 
-  (setq-local treesit-sentence-type-regexp "element")
+  (setq-local treesit-sentence-type-regexp "tag")
 
   (setq-local treesit-sexp-type-regexp
-              (regexp-opt '("tag"
+              (regexp-opt '("element"
                             "text"
                             "attribute"
                             "value")))