You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//string leftContent = "Mary had a little lamb,\nwhose fleece was white as snow.\n\n\nIt followed her to school one day,\nschool one day, school one day,\nwhich was against the rules.\n\n";
159
+
//string rightContent = "Mary had a little lamb,\nwhose fleece was red as snow.\n\n\And everywhere that Mary went,\nthe lamb was sure to go.\n\nIt followed her to school one day,\nwhich was against the rules.\n\n";
160
+
161
+
string leftContent = "Mary had a little lamb,\nwhose fleece was white as snow.\n\n";
162
+
string rightContent = "Mary had a little lamb,\nwhose fleece was red as snow.\n\nAnd everywhere that Mary went,\nthe lamb was sure to go.\n";
163
+
164
+
////
165
+
//string leftContent = "asdf\nyo";
166
+
//string rightContent = "asdf\nbe";
145
167
146
168
// if (argc > 2) {
147
169
//
@@ -160,7 +182,7 @@ int main(int argc, char *argv[])
160
182
161
183
// get the minimal diff
162
184
diff_match_patch<string> dmp;
163
-
auto diffs = dmp.diff_main(leftContent, rightContent);
185
+
auto diffs = dmp.diff_lines(leftContent, rightContent);
164
186
165
187
auto deletionLookup = createDiffLookup(diffs, stringdiff::DELETE);
166
188
summarizeLines(deletionLookup);
@@ -217,7 +239,8 @@ int main(int argc, char *argv[])
0 commit comments