branch: elpa/web-mode
commit 994cb350bceeebb031406112cf6da119e066ef8e
Author: fxbois <fxb...@gmail.com>
Commit: fxbois <fxb...@gmail.com>

    fontification of CamelCase tags
    
    web-mode-html-tag-custom-face
    see https://github.com/fxbois/web-mode/pull/1325
---
 issues/test.html | 3 +++
 web-mode.el      | 7 +++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/issues/test.html b/issues/test.html
new file mode 100644
index 0000000000..cdc1b16baf
--- /dev/null
+++ b/issues/test.html
@@ -0,0 +1,3 @@
+<span>
+  <CouCou>ici</CouCou> et <cou-cou>la</cou-cou>
+</span>
diff --git a/web-mode.el b/web-mode.el
index fdd45a30dd..483283e4c3 100644
--- a/web-mode.el
+++ b/web-mode.el
@@ -5478,7 +5478,8 @@ Also return non-nil if it is the command 
`self-insert-command' is remapped to."
         ;;(message "%S: %S (%S %S)" (point) (match-string-no-properties 0) 
reg-beg reg-end)
 
         (setq flags 0
-              tname (downcase (match-string-no-properties 1))
+              tnameraw (match-string-no-properties 1)
+              tname (downcase tnameraw)
               char (aref tname 0)
               tbeg (match-beginning 0)
               tend nil
@@ -5507,7 +5508,9 @@ Also return non-nil if it is the command 
`self-insert-command' is remapped to."
 
           ((not (member char '(?\! ?\?)))
            (cond
-             ((string-match-p "-" tname)
+             ((or (string-match-p "-" tname)
+                  (let ((case-fold-search nil))
+                    (string-match-p "^/?[[:upper:]][[:lower:]]" tnameraw)))
               (setq flags (logior flags 2)))
              ;;((string-match-p ":" tname)
              ;; (setq flags (logior flags 32)))

Reply via email to