gfse&minibar: work in progress on grammar extension fromminibar

This commit is contained in:
hallgren
2012-03-29 17:10:36 +00:00
parent bb44210ff0
commit 7114c59827
4 changed files with 101 additions and 27 deletions

View File

@@ -146,7 +146,9 @@ function empty_class(tag,cls) { return empty(tag,"class",cls); }
function div_id(id,cs) { return node("div",{id:id},cs); }
function span_id(id) { return empty_id("span",id); }
function wrap(tag,contents) { return node(tag,{},[contents]); }
function wrap(tag,contents) {
return node(tag,{},Array.isArray(contents) ? contents : [contents]);
}
function wrap_class(tag,cls,contents) {
return node(tag,{"class":cls},