[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/web-mode 8c0baa29b0 1/2: better html interpolation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/web-mode 8c0baa29b0 1/2: better html interpolation |
Date: |
Wed, 12 Oct 2022 03:59:30 -0400 (EDT) |
branch: elpa/web-mode
commit 8c0baa29b07a2455b8b2bf2d75dbf305e76545a4
Author: fxbois <fxbois@gmail.com>
Commit: fxbois <fxbois@gmail.com>
better html interpolation
#1252
---
issues/1252.js | 4 ++++
web-mode.el | 9 +++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/issues/1252.js b/issues/1252.js
new file mode 100644
index 0000000000..7e0aebed76
--- /dev/null
+++ b/issues/1252.js
@@ -0,0 +1,4 @@
+function getHTML(div){
+ const html = `<style>div { background: black; }</style> <div>${div}</div>`;
+ return html;
+}
diff --git a/web-mode.el b/web-mode.el
index 3dc0bf2a4b..222efde720 100644
--- a/web-mode.el
+++ b/web-mode.el
@@ -2,7 +2,7 @@
;; Copyright 2011-2022 François-Xavier Bois
-;; Version: 17.3.1
+;; Version: 17.3.2
;; Author: François-Xavier Bois
;; Maintainer: François-Xavier Bois <fxbois@gmail.com>
;; Package-Requires: ((emacs "23.1"))
@@ -23,7 +23,7 @@
;;---- CONSTS
------------------------------------------------------------------
-(defconst web-mode-version "17.3.1"
+(defconst web-mode-version "17.3.2"
"Web Mode version.")
;;---- GROUPS
------------------------------------------------------------------
@@ -1093,6 +1093,7 @@ Must be used in conjunction with
web-mode-enable-block-face."
(?\> . ">"))
"XML chars")
+;; #1254 : https://html.spec.whatwg.org/entities.json
(defvar web-mode-html-entities
;; #985
;; remove ("gt" . 62) ("lt" . 60) ("amp" . 38)
@@ -7313,7 +7314,7 @@ Also return non-nil if it is the command
`self-insert-command' is remapped to."
'web-mode-variable-name-face)
)
(cond
- ((web-mode-looking-back "\\(css\\|styled[[:alnum:].]+\\)" beg)
+ ((web-mode-looking-back "\\(css\\|styled[[:alnum:].]+\\|css = \\)" beg)
(goto-char (1+ beg))
(while (re-search-forward ".*?:" end t)
(put-text-property (match-beginning 0) (match-end 0)
@@ -7321,7 +7322,7 @@ Also return non-nil if it is the command
`self-insert-command' is remapped to."
'web-mode-interpolate-color1-face)
)
) ;case css
- ((web-mode-looking-back "\\(template\\|html\\)" beg)
+ ((web-mode-looking-back "\\(template\\|html\\|html = \\)" beg)
(goto-char (1+ beg))
(while (re-search-forward web-mode-tag-regexp end t)
(put-text-property (match-beginning 1) (match-end 1)