| Index: third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js b/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js
|
| index 109f3eac5a6cc11d98f7ce62b4a094967fd305b9..d11977ae2b55f6cb34219f3af9879179c0c5ed71 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormattedContentBuilder.js
|
| @@ -25,17 +25,29 @@ WebInspector.FormattedContentBuilder = function(indentString)
|
| this._newLines = 0;
|
| this._softSpace = false;
|
| this._hardSpaces = 0;
|
| + this._enforceSpaceBetweenWords = true;
|
| }
|
|
|
| WebInspector.FormattedContentBuilder.prototype = {
|
| /**
|
| + * @param {boolean} value
|
| + * @return {boolean}
|
| + */
|
| + setEnforceSpaceBetweenWords: function(value)
|
| + {
|
| + var oldValue = this._enforceSpaceBetweenWords;
|
| + this._enforceSpaceBetweenWords = value;
|
| + return oldValue;
|
| + },
|
| +
|
| + /**
|
| * @param {string} token
|
| * @param {number} offset
|
| */
|
| addToken: function(token, offset)
|
| {
|
| var last = this._formattedContent.peekLast();
|
| - if (last && /\w/.test(last[last.length - 1]) && /\w/.test(token))
|
| + if (this._enforceSpaceBetweenWords && last && /\w/.test(last[last.length - 1]) && /\w/.test(token))
|
| this.addSoftSpace();
|
|
|
| this._appendFormatting();
|
|
|