Commit ac35a4f3 authored by lushnikov's avatar lushnikov Committed by Commit bot

DevTools: [LiveSASS] property enabling/disabling should not add spaces

BUG=none
R=pfeldman

Review-Url: https://codereview.chromium.org/2020803002
Cr-Commit-Position: refs/heads/master@{#405147}
parent 727206c6
...@@ -38,7 +38,7 @@ Running: testEnableProperties ...@@ -38,7 +38,7 @@ Running: testEnableProperties
div { div {
/* This is a regular comment */ /* This is a regular comment */
color: red; color: red;
position: absolute; position: absolute;
display: block display: block
} }
......
...@@ -75,7 +75,7 @@ Edits: ...@@ -75,7 +75,7 @@ Edits:
===== test-edit-toggle-property.scss ===== ===== test-edit-toggle-property.scss =====
@for.$i.from.1.through.3.{ @for.$i.from.1.through.3.{
.....box#{$i}.{ .....box#{$i}.{
........color:.red;. ........color:.red;
........margin:.10px; ........margin:.10px;
....} ....}
} }
......
...@@ -250,7 +250,10 @@ WebInspector.SASSSupport.Property.prototype = { ...@@ -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 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 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, ""); var edit2 = new WebInspector.SourceEdit(this.document.url, oldRange2, "");
this.document.edits.push(edit1, edit2); this.document.edits.push(edit1, edit2);
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment