lib/parser/abbreviation.js
function splitAttributes(attrSet) {
		attrSet = utils.trim(attrSet);
		var parts = [];

		// split attribute set by spaces
		var stream = stringStream(attrSet), ch;
		while ((ch = stream.next())) {
			if (ch == ' ') {
				parts.push(utils.trim(stream.current()));
				// skip spaces
				while (stream.peek() == ' ') {
					stream.next();
				}

				stream.start = stream.pos;
			} else if (ch == '"' || ch == "'") {
				// skip values in strings
				if (!stream.skipString(ch)) {
					throw new Error('Invalid attribute set');
				}
			}
		}

		parts.push(utils.trim(stream.current()));
		return parts;
	}
function splitAttributes(attrSet) {
		attrSet = utils.trim(attrSet);
		var parts = [];

		// split attribute set by spaces
		var stream = stringStream(attrSet), ch;
		while ((ch = stream.next())) {
			if (ch == ' ') {
				parts.push(utils.trim(stream.current()));
				// skip spaces
				while (stream.peek() == ' ') {
					stream.next();
				}

				stream.start = stream.pos;
			} else if (ch == '"' || ch == "'") {
				// skip values in strings
				if (!stream.skipString(ch)) {
					throw new Error('Invalid attribute set');
				}
			}
		}

		parts.push(utils.trim(stream.current()));
		return parts;
	}
function splitAttributes ( attrSet ) { attrSet = utils . trim ( attrSet ) ; var parts = [ ] ; // split attribute set by spaces var stream = stringStream ( attrSet ) , ch ; while ( ( ch = stream . next ( ) ) ) { if ( ch == ' ' ) { parts . push ( utils . trim ( stream . current ( ) ) ) ; // skip spaces while ( stream . peek ( ) == ' ' ) { stream . next ( ) ; } stream . start = stream . pos ; } else if ( ch == '"' || ch == "'" ) { // skip values in strings if ( ! stream . skipString ( ch ) ) { throw new Error ( 'Invalid attribute set' ) ; } } } parts . push ( utils . trim ( stream . current ( ) ) ) ; return parts ; }
Splits attribute set into a list of attributes string
@param  {String} attrSet
@return {Array}
Splits attribute set into a list of attributes string