lib/filter/haml.js
function makeAttributesString(tag, profile) {
		var attrs = '';
		var otherAttrs = [];
		var attrQuote = profile.attributeQuote();
		var cursor = profile.cursor();
		
		tag.attributeList().forEach(function(a) {
			var attrName = profile.attributeName(a.name);
			switch (attrName.toLowerCase()) {
				// use short notation for ID and CLASS attributes
				case 'id':
					attrs += '#' + (a.value || cursor);
					break;
				case 'class':
					attrs += '.' + transformClassName(a.value || cursor);
					break;
				// process other attributes
				default:
					otherAttrs.push({
						name: attrName,
						value: a.value || cursor,
						isBoolean: profile.isBoolean(a.name, a.value)
					});
			}
		});
		
		if (otherAttrs.length) {
			attrs += stringifyAttrs(condenseDataAttrs(otherAttrs), profile);
		}
		
		return attrs;
	}
function makeAttributesString(tag, profile) {
		var attrs = '';
		var otherAttrs = [];
		var attrQuote = profile.attributeQuote();
		var cursor = profile.cursor();
		
		tag.attributeList().forEach(function(a) {
			var attrName = profile.attributeName(a.name);
			switch (attrName.toLowerCase()) {
				// use short notation for ID and CLASS attributes
				case 'id':
					attrs += '#' + (a.value || cursor);
					break;
				case 'class':
					attrs += '.' + transformClassName(a.value || cursor);
					break;
				// process other attributes
				default:
					otherAttrs.push({
						name: attrName,
						value: a.value || cursor,
						isBoolean: profile.isBoolean(a.name, a.value)
					});
			}
		});
		
		if (otherAttrs.length) {
			attrs += stringifyAttrs(condenseDataAttrs(otherAttrs), profile);
		}
		
		return attrs;
	}
function makeAttributesString ( tag , profile ) { var attrs = '' ; var otherAttrs = [ ] ; var attrQuote = profile . attributeQuote ( ) ; var cursor = profile . cursor ( ) ; tag . attributeList ( ) . forEach ( function ( a ) { var attrName = profile . attributeName ( a . name ) ; switch ( attrName . toLowerCase ( ) ) { // use short notation for ID and CLASS attributes case 'id' : attrs += '#' + ( a . value || cursor ) ; break ; case 'class' : attrs += '.' + transformClassName ( a . value || cursor ) ; break ; // process other attributes default : otherAttrs . push ( { name : attrName , value : a . value || cursor , isBoolean : profile . isBoolean ( a . name , a . value ) } ) ; } } ) ; if ( otherAttrs . length ) { attrs += stringifyAttrs ( condenseDataAttrs ( otherAttrs ) , profile ) ; } return attrs ; }
Creates HAML attributes string from tag according to profile settings
@param {AbbreviationNode} tag
@param {Object} profile
Creates HAML attributes string from tag according to profile settings