Skip to content
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

Bug in text differ #90

Closed
clonejo opened this issue Jan 6, 2022 · 3 comments
Closed

Bug in text differ #90

clonejo opened this issue Jan 6, 2022 · 3 comments
Labels

Comments

@clonejo
Copy link

clonejo commented Jan 6, 2022

In this example, the added line "bar" is not visible in the diff. Instead, "baz" is printed twice.

$ printf "foo\n" >foo
$ printf "bar\nbaz\n" >bar
$ difft foo bar
bar --- 1/2 --- text
1 . foo

bar --- 2/2 --- text
1 2 baz
. 2 baz

$ difft --version
Difftastic 0.15.0

Also, shouldn't this be just one hunk?

@Wilfred
Copy link
Owner

Wilfred commented Jan 7, 2022

Thanks for the report. I think this is a bug with alignment and display, and isn't specific to text diffing.

Wilfred added a commit that referenced this issue Jan 22, 2022
Fixes a crash when testing #90 against trunk.
@Wilfred
Copy link
Owner

Wilfred commented Jan 23, 2022

FWIW it's not too surprising that this case ended up with two hunks. The files have nothing at all in common, so difftastic struggles to work out if the first hunk (changing the left) and the second hunk (changing the right) are near enough to merge.

It's now a single hunk on master though.

@clonejo
Copy link
Author

clonejo commented Jan 23, 2022

IMO either way would make sense.

Wilfred added a commit that referenced this issue Jan 23, 2022
This causes us to match up unrelated lines, and doesn't make sense for
a line parser.

Improves #90.
Wilfred pushed a commit that referenced this issue Mar 10, 2022
… enables heredoc as function argument (#90)

* Adds more libraries to test suite and fixes identified errors in the grammar

* Adds tests for fixed bugs in array destructuring and tests using heredoc as function argument

* Remove unneeded optional(',')

* Fixes bug with mis-placed value field in Enum implementation as well as an annoying typo

* Adds support for arbitrary amount of whitespace after heredoc end tag
ap-nri pushed a commit to ap-nri/difftastic that referenced this issue Apr 1, 2022
Wilfred pushed a commit that referenced this issue Mar 17, 2023
Made body optional for method_declaration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants