Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js b/third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js |
| index 0a81a04251c83f6c3062f39d0dcc14db65ff9136..846d03b76fe8b4726db7266a512ff7e2629f23f3 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js |
| @@ -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(2, -2).trim().endsWith(";"); |
|
dgozman
2016/05/30 18:27:11
No need to slice from the start?
lushnikov
2016/07/11 18:55:09
Done.
|
| + 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); |
| }, |