code: function normalizeWhitespace(content) {
  	var compressed = '',
  		preformatted = 0,
  		p = 0, m, text;
  
  	REGEXP_TAG.lastIndex = 0;
  	while ( (m = REGEXP_TAG.exec(content)) ) {
  		if ( m.index > p ) {
  			text = content.slice(p, m.index);
  			if ( preformatted ) {
  				compressed += text;
  				// debug('  "' + text + '" (preformatted)');
  			} else {
  				text = text.replace(/\s+/g,' ');
  				if ( text.trim() ) {
  					compressed += text;
  				}
  				// debug('  "' + text + '" (trimmed)');
  			}
  		}
  
  		compressed += m[0];
  		// debug('  "' + m[0] + '" (tag)');
  		p = m.index + m[0].length;
  
  		if ( /^pre$/i.test(m[1]) ) {
  			preformatted++;
  		} else if ( /^\/pre$/i.test(m[1]) && preformatted ) {
  			preformatted--;
  		}
  
  	}
  
  	if ( content.length > p ) {
  		text = content.slice(p, content.length);
  		if ( preformatted ) {
  			compressed += text;
  			// debug('  "' + text + '" (preformatted)');
  		} else {
  			text = text.replace(/\s+/g,' ');
  			if ( text.trim() ) {
  				compressed += text;
  			}
  			// debug('  "' + text + '" (trimmed)');
  		}
  	}
  
  	return compressed;
  }
docs: Removes unnecessary whitespace from an HTML document:
  - if the text between two adjacent HTML tags consists of whitespace only, the whole text is removed
  - otherwise, any sequence of whitespace in the text is reduced to a single blank
  - inside a <pre> tag, whitespace is preserved
  
  Whitespace inside an element tag is not touched (although it could be normalized as well)
  @param {string} content raw HTML file
  @returns {string} HTML file with normalized whitespace