From 73ab96f2a76e23566d410425ba716234d94f8858 Mon Sep 17 00:00:00 2001 From: flyingleafe Date: Mon, 25 Aug 2014 03:42:30 +0600 Subject: Fixed single quotes in style attr --- emmet-mode.el | 8 ++++---- src/mode-def.el | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/emmet-mode.el b/emmet-mode.el index 991c68e..2b4ddf7 100644 --- a/emmet-mode.el +++ b/emmet-mode.el @@ -3509,9 +3509,9 @@ tbl)) (save-excursion (save-match-data (let ((char (char-before)) (last-gt (point)) - (in-style-attr (looking-back "style=\"[^\"]*"))) + (in-style-attr (looking-back "style=[\"'][^\"']*"))) (while char - (cond ((and in-style-attr (eq char ?\")) + (cond ((and in-style-attr (member char '(?\" ?\'))) (setq char nil)) ((member char '(?\} ?\] ?\))) (with-syntax-table (standard-syntax-table) @@ -3570,8 +3570,8 @@ e. g. without semicolons") new-pos)))))) (defun emmet-detect-style-tag-and-attr () - (let* ((qt "\"") - (not-qt (format "[^%s]" qt)) + (let* ((qt "[\"']") + (not-qt "[^\"']") (everything "\\(.\\|\n\\)*")) (or (and (looking-at (format "%s*%s" not-qt qt)) diff --git a/src/mode-def.el b/src/mode-def.el index 78c9fa4..7cac58d 100644 --- a/src/mode-def.el +++ b/src/mode-def.el @@ -20,9 +20,9 @@ (save-excursion (save-match-data (let ((char (char-before)) (last-gt (point)) - (in-style-attr (looking-back "style=\"[^\"]*"))) + (in-style-attr (looking-back "style=[\"'][^\"']*"))) (while char - (cond ((and in-style-attr (eq char ?\")) + (cond ((and in-style-attr (member char '(?\" ?\'))) (setq char nil)) ((member char '(?\} ?\] ?\))) (with-syntax-table (standard-syntax-table) @@ -81,8 +81,8 @@ e. g. without semicolons") new-pos)))))) (defun emmet-detect-style-tag-and-attr () - (let* ((qt "\"") - (not-qt (format "[^%s]" qt)) + (let* ((qt "[\"']") + (not-qt "[^\"']") (everything "\\(.\\|\n\\)*")) (or (and (looking-at (format "%s*%s" not-qt qt)) -- cgit v1.2.3