/*! HTML - v0.12.1 - 2014-10-22
* http://nbubna.github.io/HTML/
* Copyright (c) 2014 ESHA Research; Licensed MIT, GPL */
(function(document, _) {
"use strict";
var add = _.fn.add;
add.create = function(node, code, ref) {
var parts = code.match(add.emmetRE()).filter(Boolean),
root = document.createDocumentFragment(),
el = document.createElement(parts[0]);
root.appendChild(el);
for (var i=1,m=parts.length; i': function(tag) {
if (tag) {
var el = document.createElement(tag);
this.appendChild(el);
return el;
}
return this;
},
'+': function(tag, root) {
return add.emmet['>'].call(this.parentNode || root, tag);
},
'*': function(count) {
var parent = this.parentNode,
els = [this];
for (var i=1; i