branch: elpa/web-mode commit 1896ca2e371cb34d127390d059f1069bbb97f900 Author: Tim Janik <t...@gnu.org> Commit: Tim Janik <t...@gnu.org>
web-mode.el: allow [.@?] prefixes for attributes in literal strings This adds support for lit-html which makes use of syntax like .value="7" ?readonly="false" and @click="func" for html attributes in literal strings. Signed-off-by: Tim Janik <t...@gnu.org> --- web-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-mode.el b/web-mode.el index 1f69cefc98..367863d812 100644 --- a/web-mode.el +++ b/web-mode.el @@ -7067,7 +7067,7 @@ Also return non-nil if it is the command `self-insert-command' is remapped to." 'web-mode-interpolate-color1-face) ) (goto-char (1+ beg)) - (while (re-search-forward "</?\\|/?>\\| [[:alnum:]]+=" end t) + (while (re-search-forward "</?\\|/?>\\| [.@?]?[[:alnum:]]+=" end t) (cond ((member (char-after (match-beginning 0)) '(?\< ?\/ ?\>)) (put-text-property (match-beginning 0) (match-end 0)