Skip to content

Conversation

@yokurang
Copy link
Collaborator

No description provided.

lib/WordDiff.ml Outdated
construct_pairs [] ys lcs ((None, Some y) :: acc)
| x :: xs, y :: ys, [] ->
construct_diff xs ys [] (Changed x :: acc_mine) (Changed y :: acc_their)
construct_pairs xs ys [] ((Some x, Some y) :: acc)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pairing these lines is wrong!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, do you mind elaborating more on why it is wrong?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try it on the following test!

- aaaaaaaaa a
- egdg xsd fi sdgfyu s gd csue c e yeg scy
+ aaaaaaaaa b
+ yugyu fft yu utf ytfutf uyg gygu yftuf gg uf ft

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LACS -> A sequence of lines
Here, we have two lines in 1 and two lines in 2.
So LCAS is a matter of lines. Here, it will be a length of 1, and the LCAS are (Some aaaaaaaaa a, Some aaaaaaaaa b)

So here, in the accumulator, I am adding x and y as being paired, when x and y are not part of the LACS.
Here, the example, x and y corresponds to egdg ... and yugyu ...
So they should not be paired.

yokurang and others added 2 commits August 28, 2024 23:07
- Fixed bugs in the pairing of lines
    The LACS must consist of the _two_ subsequence
- Finished rendering paired lines

Co-authored-by: Alan Matthew <[email protected]>
@panglesd panglesd force-pushed the word-diffing-multiple-lines branch from 6424540 to a978092 Compare August 28, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants