aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflyingleafe <flyingleafe@gmail.com>2014-08-25 03:42:30 +0600
committerflyingleafe <flyingleafe@gmail.com>2014-08-25 03:42:30 +0600
commitdb967f5efc29462b3a100b03a41c22cd80f40403 (patch)
treeeac33167845e96baadec88a160fe5cde5273136c
parent47ca6f1fde614435033c505a2ce4dbdf5d1be2e3 (diff)
downloademmet-mode-db967f5efc29462b3a100b03a41c22cd80f40403.tar.lz
emmet-mode-db967f5efc29462b3a100b03a41c22cd80f40403.tar.xz
emmet-mode-db967f5efc29462b3a100b03a41c22cd80f40403.zip
Fixed single quotes in style attr
-rw-r--r--emmet-mode.el8
-rw-r--r--src/mode-def.el8
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))