Skip to content

Commit

Permalink
DevTools: [LiveSASS] property enabling/disabling should not add spaces
Browse files Browse the repository at this point in the history
BUG=none
R=pfeldman

Review-Url: https://codereview.chromium.org/2020803002
Cr-Commit-Position: refs/heads/master@{#405147}
  • Loading branch information
aslushnikov authored and Commit bot committed Jul 13, 2016
1 parent 8015295 commit 0c99e59
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion front_end/sass/SASSSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ WebInspector.SASSSupport.Property.prototype = {
}
var oldRange1 = new WebInspector.TextRange(this.range.startLine, this.range.startColumn, this.range.startLine, this.name.range.startColumn);
var edit1 = new WebInspector.SourceEdit(this.document.url, oldRange1, "");
var oldRange2 = new WebInspector.TextRange(this.range.endLine, this.range.endColumn - 2, this.range.endLine, this.range.endColumn);

var propertyText = this.document.text.extract(this.range);
var endsWithSemicolon = propertyText.slice(0, -2).trim().endsWith(";");
var oldRange2 = new WebInspector.TextRange(this.range.endLine, this.value.range.endColumn + (endsWithSemicolon ? 1 : 0), this.range.endLine, this.range.endColumn);
var edit2 = new WebInspector.SourceEdit(this.document.url, oldRange2, "");
this.document.edits.push(edit1, edit2);
},
Expand Down

0 comments on commit 0c99e59

Please sign in to comment.