code: function parseAttributes(abbr) {
  		/*
  		 * Example of incoming data:
  		 * #header
  		 * .some.data
  		 * .some.data#header
  		 * [attr]
  		 * #item[attr=Hello other="World"].class
  		 */
  		var result = [];
  		var attrMap = {'#': 'id', '.': 'class'};
  		var nameEnd = null;
  		
  		/** @type StringStream */
  		var stream = stringStream.create(abbr);
  		while (!stream.eol()) {
  			switch (stream.peek()) {
  				case '#': // id
  				case '.': // class
  					if (nameEnd === null)
  						nameEnd = stream.pos;
  					
  					var attrName = attrMap[stream.peek()];
  					
  					stream.next();
  					stream.start = stream.pos;
  					stream.eatWhile(reWord);
  					result.push({
  						name: attrName, 
  						value: stream.current()
  					});
  					break;
  				case '[': //begin attribute set
  					if (nameEnd === null)
  						nameEnd = stream.pos;
  					
  					stream.start = stream.pos;
  					if (!stream.skipToPair('[', ']')) {
  						throw new Error('Invalid attribute set definition');
  					}
  					
  					result = result.concat(
  						extractAttributes(stripped(stream.current()))
  					);
  					break;
  				default:
  					stream.next();
  			}
  		}
  		
  		if (!result.length)
  			return null;
  		
  		return {
  			element: abbr.substring(0, nameEnd),
  			attributes: optimizeAttributes(result)
  		};
  	}
docs: Parses tag attributes extracted from abbreviation. If attributes found,
  returns object with <code>element</code> and <code>attributes</code>
  properties
  @param {String} abbr
  @returns {Object} Returns <code>null</code> if no attributes found in
  abbreviation