-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Panic diffing text #681
Comments
I got the same “out of bounds” issue on a ~500 lines csv file interpreted as text, but not at the same place in the code : thread 'main' panicked at src/display/side_by_side.rs:505:34:
index out of bounds: the len is 462 but the index is 462 |
JonathanxD
added a commit
to JonathanxD/difftastic
that referenced
this issue
Apr 5, 2024
Fixes Wilfred#688, fixes Wilfred#694, fixes Wilfred#682, and fixes Wilfred#681.
JonathanxD
added a commit
to JonathanxD/difftastic
that referenced
this issue
Apr 5, 2024
This one fixes Wilfred#681. The previous one didn't fixed the very specific case of Wilfred#681 with the provided csv, this one does.
JonathanxD
added a commit
to JonathanxD/difftastic
that referenced
this issue
Apr 5, 2024
This one fixes Wilfred#681. The previous one didn't fixed the very specific case of Wilfred#681 with the provided csv, this one does.
JonathanxD
added a commit
to JonathanxD/difftastic
that referenced
this issue
Apr 5, 2024
Fixes Wilfred#688, fixes Wilfred#694 and fixes Wilfred#681.
JonathanxD
added a commit
to JonathanxD/difftastic
that referenced
this issue
Apr 5, 2024
This one fixes Wilfred#681. The previous one didn't fixed the very specific case of Wilfred#681 with the provided csv, this one does.
JonathanxD
added a commit
to JonathanxD/difftastic
that referenced
this issue
Apr 6, 2024
Fixes Wilfred#688, fixes Wilfred#694, fixes Wilfred#682 and fixes Wilfred#681. This works around the fact that `str::lines` does not include last newline character. This means that `"a\n".lines().count() == "a".lines().count()`, which breaks the 1:1 assumption made by display implementations.
JonathanxD
added a commit
to JonathanxD/difftastic
that referenced
this issue
Apr 6, 2024
Fixes Wilfred#688, fixes Wilfred#694, fixes Wilfred#682 and fixes Wilfred#681. This works around the fact that `str::lines` does not include last newline character. This means that `"a\n".lines().count() == "a".lines().count()`, which breaks the 1:1 assumption made by display implementations.
Merging into #688, thanks for the report! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm not totally sure what about the first or second content is causing this, but I'm diffing two Markdown files (which are detected as text files) and get a panic. Using
Difftastic 0.56.1 (built with rustc 1.74.1)
on Ubuntu.I have tried to make a minimum reproduction. But removing seemingly any of the content from the new file does not cause a panic. Files here:
custom-connectors-new.md
custom-connectors-old.md
The text was updated successfully, but these errors were encountered: