code: function(tag, attribs, contents, selfclosing) {
    var result = '<' + tag;
    if (attribs) {
      var i = 0;
      var attrib;
      while ((attrib = attribs[i]) !== undefined) {
        result = result.concat(' ', attrib[0], '="', attrib[1], '"');
        i++;
      }
    }
    if (contents) {
      result = result.concat('>', contents, '</', tag, '>');
    } else if (selfclosing) {
      result = result + ' />';
    } else {
      result = result.concat('></', tag, '>');
    }
    return result;
  }
docs: HTML RENDERER Helper function to produce content in a pair of HTML tags.