Skip to content

Commit

Permalink
Resolved issue rooney#4 "div is not a block tag by default".
Browse files Browse the repository at this point in the history
  • Loading branch information
smihica committed Aug 6, 2013
1 parent 57b7cf6 commit b756b29
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
4 changes: 2 additions & 2 deletions conf/preferences.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dfn": {"block": false, "selfClosing": false},
"dialog": {"block": false, "selfClosing": false},
"dir": {"block": true, "selfClosing": false},
"div": {"block": true, "selfClosing": false},
"div": {"block": false, "selfClosing": false},
"dl": {"block": true, "selfClosing": false},
"dt": {"block": false, "selfClosing": false},
"em": {"block": false, "selfClosing": false},
Expand Down Expand Up @@ -369,4 +369,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion emmet-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ tbl) tbl)
tbl) tbl)
(puthash "div" (let ((tbl (make-hash-table :test 'equal)))
(puthash "selfClosing" nil tbl)
(puthash "block" t tbl)
(puthash "block" nil tbl)
tbl) tbl)
(puthash "dir" (let ((tbl (make-hash-table :test 'equal)))
(puthash "selfClosing" nil tbl)
Expand Down
2 changes: 1 addition & 1 deletion src/preferences.el
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ tbl) tbl)
tbl) tbl)
(puthash "div" (let ((tbl (make-hash-table :test 'equal)))
(puthash "selfClosing" nil tbl)
(puthash "block" t tbl)
(puthash "block" nil tbl)
tbl) tbl)
(puthash "dir" (let ((tbl (make-hash-table :test 'equal)))
(puthash "selfClosing" nil tbl)
Expand Down
26 changes: 8 additions & 18 deletions src/test.el
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,10 @@
"a.x" ("<a class=\"x\" href=\"\"></a>")
"a#q.x" ("<a id=\"q\" class=\"x\" href=\"\"></a>")
"a#q.x.y.z" ("<a id=\"q\" class=\"x y z\" href=\"\"></a>")
"#q" ("<div id=\"q\">"
"</div>")
".x" ("<div class=\"x\">"
"</div>")
"#q.x" ("<div id=\"q\" class=\"x\">"
"</div>")
"#q.x.y.z" ("<div id=\"q\" class=\"x y z\">"
"</div>"))
"#q" ("<div id=\"q\"></div>")
".x" ("<div class=\"x\"></div>")
"#q.x" ("<div id=\"q\" class=\"x\"></div>")
"#q.x.y.z" ("<div id=\"q\" class=\"x y z\"></div>"))

(define-emmet-transform-html-test-case Empty-tags
"a/" ("<a href=\"\"/>")
Expand Down Expand Up @@ -128,10 +124,7 @@
"a#q.x>b" ("<a id=\"q\" class=\"x\" href=\"\"><b></b></a>")
"a#q.x.y.z>b" ("<a id=\"q\" class=\"x y z\" href=\"\"><b></b></a>")
"a#q.x.y.z>b#p.l.m.n" ("<a id=\"q\" class=\"x y z\" href=\"\"><b id=\"p\" class=\"l m n\"></b></a>")
"#q>.x" ("<div id=\"q\">"
" <div class=\"x\">"
" </div>"
"</div>")
"#q>.x" ("<div id=\"q\"><div class=\"x\"></div></div>")
"a>b+c" ("<a href=\"\">"
" <b></b>"
" <c></c>"
Expand Down Expand Up @@ -160,8 +153,7 @@
"</a>")

"div+a>p>span{foo}+em>b^^^p"
("<div>"
"</div>"
("<div></div>"
"<a href=\"\">"
" <p>"
" <span>foo</span>"
Expand All @@ -171,8 +163,7 @@
"<p></p>")

"div+div>p>span+em^blockquote{foo}"
("<div>"
"</div>"
("<div></div>"
"<div>"
" <p>"
" <span></span>"
Expand Down Expand Up @@ -361,8 +352,7 @@
"#a>.b|c" ("<!-- #a -->"
"<div id=\"a\">"
" <!-- .b -->"
" <div class=\"b\">"
" </div>"
" <div class=\"b\"></div>"
" <!-- /.b -->"
"</div>"
"<!-- /#a -->"))
Expand Down

0 comments on commit b756b29

Please sign in to comment.