bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js
function(token, str, pos) {
			if (!token && this.isWhitespaceVisible && /\s+/.test(str)) {
				var whitespaceStyles = [], start, type;
				for (var i=0; i < str.length; i++) {
					var chr = str[i];
					if (chr !== type) {
						if (type) {
							whitespaceStyles.push([pos + start, pos + i, (type === "\t" ? TAB : SPACE)]);
						}
						start = i;
						type = chr;
					}
				}
				whitespaceStyles.push([pos + start, pos + i, (type === "\t" ? TAB : SPACE)]);
				return whitespaceStyles;
			}
			return null;
		}
function(token, str, pos) {
			if (!token && this.isWhitespaceVisible && /\s+/.test(str)) {
				var whitespaceStyles = [], start, type;
				for (var i=0; i < str.length; i++) {
					var chr = str[i];
					if (chr !== type) {
						if (type) {
							whitespaceStyles.push([pos + start, pos + i, (type === "\t" ? TAB : SPACE)]);
						}
						start = i;
						type = chr;
					}
				}
				whitespaceStyles.push([pos + start, pos + i, (type === "\t" ? TAB : SPACE)]);
				return whitespaceStyles;
			}
			return null;
		}
function ( token , str , pos ) { if ( ! token && this . isWhitespaceVisible && / \s+ / . test ( str ) ) { var whitespaceStyles = [ ] , start , type ; for ( var i = 0 ; i < str . length ; i ++ ) { var chr = str [ i ] ; if ( chr !== type ) { if ( type ) { whitespaceStyles . push ( [ pos + start , pos + i , ( type === "\t" ? TAB : SPACE ) ] ) ; } start = i ; type = chr ; } } whitespaceStyles . push ( [ pos + start , pos + i , ( type === "\t" ? TAB : SPACE ) ] ) ; return whitespaceStyles ; } return null ; }
If given an un-token'd chunk of whitespace, returns whitespace style tokens for it.
@returns {Array} The whitespace styles for the token, or null.
If given an un - token d chunk of whitespace returns whitespace style tokens for it .