src/template/adaptor.js
function parseStringAttrs(templates, context) {
  var stringAttrs = '';
  var toString = new ToString(true, true);
  for (var i = 0; i < templates.length; i++) {
    toString.clear();
    render(toString, templates[i], context);
    stringAttrs += ' ' + toString.getOutput() + ' ';
  }
  if (whitespaceOnlyRegex.test(stringAttrs)) {
    return null;
  }
  var node = htmlParser('<div ' + stringAttrs + '></div>');
  return node.properties.attributes;
}
function parseStringAttrs(templates, context) {
  var stringAttrs = '';
  var toString = new ToString(true, true);
  for (var i = 0; i < templates.length; i++) {
    toString.clear();
    render(toString, templates[i], context);
    stringAttrs += ' ' + toString.getOutput() + ' ';
  }
  if (whitespaceOnlyRegex.test(stringAttrs)) {
    return null;
  }
  var node = htmlParser('<div ' + stringAttrs + '></div>');
  return node.properties.attributes;
}
function parseStringAttrs ( templates , context ) { var stringAttrs = '' ; var toString = new ToString ( true , true ) ; for ( var i = 0 ; i < templates . length ; i ++ ) { toString . clear ( ) ; render ( toString , templates [ i ] , context ) ; stringAttrs += ' ' + toString . getOutput ( ) + ' ' ; } if ( whitespaceOnlyRegex . test ( stringAttrs ) ) { return null ; } var node = htmlParser ( '<div ' + stringAttrs + '></div>' ) ; return node . properties . attributes ; }
Used to parse loose interpolators inside a opening tag
@param  {Object}  templates Template object
@param  {Context} context   current Context to evaluate in
@return {Object}            Parsed dictionary of attribute names/values
Used to parse loose interpolators inside a opening tag