Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(733)

Unified Diff: third_party/WebKit/Source/devtools/front_end/sass/SASSSupport.js

Issue 2020803002: DevTools: [LiveSASS] property enabling/disabling should not add spaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sass/test-edit-toggle-property-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
},
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sass/test-edit-toggle-property-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698