lib/stmd.js
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;
}
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;
}
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 ; }
HTML RENDERER Helper function to produce content in a pair of HTML tags.
HTML RENDERER Helper function to produce content in a pair of HTML tags .