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

Unified Diff: third_party/WebKit/Source/devtools/front_end/diff/Diff.js

Issue 2751813002: DevTools: Clean up character diff (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | third_party/WebKit/Source/devtools/front_end/externs.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/diff/Diff.js
diff --git a/third_party/WebKit/Source/devtools/front_end/diff/Diff.js b/third_party/WebKit/Source/devtools/front_end/diff/Diff.js
index 91fafabd1cd214616d33afc8c2ef3ad0756a57a3..16ca6027c5fa17292eba4d016828c29d04ff8cbe 100644
--- a/third_party/WebKit/Source/devtools/front_end/diff/Diff.js
+++ b/third_party/WebKit/Source/devtools/front_end/diff/Diff.js
@@ -5,11 +5,15 @@ Diff.Diff = {
/**
* @param {string} text1
* @param {string} text2
+ * @param {boolean=} cleanup
* @return {!Array.<!{0: number, 1: string}>}
*/
- charDiff: function(text1, text2) {
+ charDiff: function(text1, text2, cleanup) {
var differ = new diff_match_patch();
- return differ.diff_main(text1, text2);
+ var diff = differ.diff_main(text1, text2);
+ if (cleanup)
+ differ.diff_cleanupSemantic(diff);
+ return diff;
},
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698