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
{{ message }}
This repository was archived by the owner on Aug 5, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 5, 2024. It is now read-only.
Issue: Code breaking when there is no change in a line #141
Suppose if there are 5lines of code to check difference and there are changes in Line:1,2,5. The library is helping to print the difference with line number for line:1,2 and when there is a break in line number i.e.,line5 here line number is not getting printed instead char count number is being printed
@ravellaabhinav I'm having trouble undestanding what the issue is. From your screenshot, it looks like the library is providing the right indications of what changed in the text.
What is your specific question? What specifically are you seeing as broken? What specific output would you have expected differently?
function diff_lineMode(text1, text2) { var dmp = new diff_match_patch(); var a = dmp.diff_linesToChars_(text1, text2); var lineText1 = a.chars1; var lineText2 = a.chars2; var lineArray = a.lineArray; var diffs = dmp.diff_main(lineText1, lineText2, false); dmp.diff_charsToLines_(diffs, lineArray); return diffs; }
Suppose if there are 5lines of code to check difference and there are changes in Line:1,2,5. The library is helping to print the difference with line number for line:1,2 and when there is a break in line number i.e.,line5 here line number is not getting printed instead char count number is being printed
Error: