branch: elpa/web-mode commit 9356c84f0e05125d79f44e19ba8a8be935fb38de Author: fxbois <fxb...@gmail.com> Commit: fxbois <fxb...@gmail.com>
fix element renaming #1214 --- web-mode.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web-mode.el b/web-mode.el index a1b89e3a4c..d9f24b1d5d 100644 --- a/web-mode.el +++ b/web-mode.el @@ -3,7 +3,7 @@ ;; Copyright 2011-2022 François-Xavier Bois -;; Version: 17.1.2 +;; Version: 17.1.3 ;; Author: François-Xavier Bois <fxbois AT Google Mail Service> ;; Maintainer: François-Xavier Bois ;; Package-Requires: ((emacs "23.1")) @@ -24,7 +24,7 @@ ;;---- CONSTS ------------------------------------------------------------------ -(defconst web-mode-version "17.1.2" +(defconst web-mode-version "17.1.3" "Web Mode version.") ;;---- GROUPS ------------------------------------------------------------------ @@ -10585,12 +10585,12 @@ Prompt user if TAG-NAME isn't provided." (unless tag-name (setq tag-name (read-from-minibuffer "New tag name? "))) (when (and (> (length tag-name) 0) (web-mode-element-beginning) - (looking-at "<\\([[:alnum:]]+\\(:?[-][[:alpha:]]+\\)?\\)")) + (looking-at "<\\([[:alnum:]]+\\(:?[[:alpha:]_-]+\\)?\\)")) (setq pos (point)) (unless (web-mode-element-is-void) (save-match-data (web-mode-tag-match) - (if (looking-at "</[ ]*\\([[:alnum:]]+\\(:?[-][[:alpha:]]+\\)?\\)") + (if (looking-at "</[ ]*\\([[:alnum:]]+\\(:?[[:alpha:]_-]+\\)?\\)") (replace-match (concat "</" tag-name)) ))) (goto-char pos)