emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/evil be97395e31: Allow parsing of js arrow fn `=>` in xml


From: ELPA Syncer
Subject: [nongnu] elpa/evil be97395e31: Allow parsing of js arrow fn `=>` in xml tags (#1573)
Date: Tue, 18 Jan 2022 17:58:09 -0500 (EST)

branch: elpa/evil
commit be97395e31861fa7b84e7440a87db455e2089107
Author: Tom Dalziel <33435574+tomdl89@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Allow parsing of js arrow fn `=>` in xml tags (#1573)
---
 evil-common.el |  2 +-
 evil-tests.el  | 11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/evil-common.el b/evil-common.el
index 7c8b330b7b..3bb67a1d9f 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -1559,7 +1559,7 @@ last successful match (that caused COUNT to reach zero)."
         (while
             (and (setq match
                        (re-search-forward
-                        "<\\([^/ 
>\n]+\\)\\(?:[^\"/>]\\|\"[^\"]*\"\\)*?>\\|</\\([^>]+?\\)>"
+                        "<\\([^/ 
>\n]+\\)\\(?:=>?\\|[^\"/>]\\|\"[^\"]*\"\\)*?>\\|</\\([^>]+?\\)>"
                         nil t dir))
                  (cond
                   ((match-beginning op)
diff --git a/evil-tests.el b/evil-tests.el
index 8a5f4b1b91..a0c057eba6 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -6922,9 +6922,14 @@ test hello <a href=\"/deed.zh\">Creative Commons</a>
 </p>[\n]}</div>
 </body>
 </html>
-"
-
-      )))
+"))
+  (ert-info ("Handle js arrow fns")
+    (evil-test-buffer
+      :visual-start "«"
+      :visual-end "»"
+      "<button foo=\"bar\" onClick={() => fnbody()}>inner [t]ext</button>"
+      ("vit")
+      "<button foo=\"bar\" onClick={() => fnbody()}>«inner tex[t]»</button>")))
 
 ;;; Visual state
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]