Skip to content

Lines with differences from start- to endcharacter not properly marked #83

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

Closed
DigiLive opened this issue Dec 3, 2020 · 4 comments · Fixed by #84
Closed

Lines with differences from start- to endcharacter not properly marked #83

DigiLive opened this issue Dec 3, 2020 · 4 comments · Fixed by #84
Assignees
Labels

Comments

@DigiLive
Copy link
Collaborator

DigiLive commented Dec 3, 2020

If a line is different at the other version from the first to the last character, the line isn't marked when inlineMarking is set to CHANGE_LEVEL_LINE.

@DigiLive DigiLive added the bug label Dec 3, 2020
@DigiLive DigiLive self-assigned this Dec 3, 2020
@DigiLive DigiLive changed the title Lines with single character not properly marked Lines with differences from start- to endcharacter not properly marked Dec 3, 2020
@DigiLive
Copy link
Collaborator Author

DigiLive commented Dec 3, 2020

I think it's the following line to blame, but it's imported when the lib was forked:

if ($start != 0 || $end != 0) {

I think...
...it can be safely removed.
$start and $end will both be 0 when the first difference is at the start of the string and the last difference at the end.
Imho, the complete string should be marked as being different.

...it was meant for skipping code when there aren't any differences found by method getOuterChange.
However, method markOuterChange is only called by renderSequences > markInlineChanges if the opCode tag is replace anyway. Which means something must be different.

@JBlond
Copy link
Owner

JBlond commented Dec 4, 2020

I think...
...it can be safely removed.

Easy to find out. remove the lines, run the unit tests, run a visual test and create a PR :D

@DigiLive
Copy link
Collaborator Author

DigiLive commented Dec 4, 2020

Haha... I will.
Not very sure this time because it's always been there and the sample texts don't cover all cases.

@vendeeglobe
Copy link

vendeeglobe commented Dec 4, 2020

We collect and cover all new cases as soon as we discover them, even after the release!

DigiLive added a commit that referenced this issue Dec 4, 2020
If a line is different at the other version from the first to the last
character, the line isn't marked when inlineMarking is set to
CHANGE_LEVEL_LINE.
@DigiLive DigiLive linked a pull request Dec 4, 2020 that will close this issue
@JBlond JBlond closed this as completed in #84 Dec 4, 2020
JBlond added a commit that referenced this issue Dec 4, 2020
Fix #83 - Lines not properly marked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants