From ba2b0d9cc7b3631d553425bfbc3fee03ae3e01ed Mon Sep 17 00:00:00 2001 From: Ron Panduwana Date: Thu, 3 Feb 2011 10:15:45 +0700 Subject: div tag name can be omitted when writing element starting from ID or CLASS: #content>.section is the same as div#content>div.section --- zencoding-mode.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'zencoding-mode.el') 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))) -- cgit v1.2.3