aboutsummaryrefslogtreecommitdiffstats
path: root/zencoding-mode.el
diff options
context:
space:
mode:
authorRon Panduwana <panduwana@gmail.com>2011-02-03 10:15:45 +0700
committerRon Panduwana <panduwana@gmail.com>2011-02-03 10:15:45 +0700
commitba2b0d9cc7b3631d553425bfbc3fee03ae3e01ed (patch)
tree02a29f186dc3b3bbcc6a80be800b7a46296b0e5d /zencoding-mode.el
parentb67993a16b71ab6f43ea32f7fc8f8e5447a00f05 (diff)
downloademmet-mode-ba2b0d9cc7b3631d553425bfbc3fee03ae3e01ed.tar.lz
emmet-mode-ba2b0d9cc7b3631d553425bfbc3fee03ae3e01ed.tar.xz
emmet-mode-ba2b0d9cc7b3631d553425bfbc3fee03ae3e01ed.zip
div tag name can be omitted when writing element starting from ID or CLASS: #content>.section is the same as div#content>div.section
Diffstat (limited to 'zencoding-mode.el')
-rw-r--r--zencoding-mode.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/zencoding-mode.el b/zencoding-mode.el
index b8af1b6..e98176d 100644
--- a/zencoding-mode.el
+++ b/zencoding-mode.el
@@ -137,6 +137,11 @@
(defun zencoding-tag (input)
"Parse a tag."
+ (let ((first-char (substring input 0 1)))
+ (if (or (string= "#" first-char)
+ (string= "." first-char))
+ (setq input (concat "div" input))
+ nil))
(zencoding-run zencoding-tagname
(let ((tagname (cadr expr))
(has-body? (cddr expr)))