Skip to content

Proposal/issue 44 #45

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

Merged
merged 3 commits into from
Sep 21, 2019
Merged

Proposal/issue 44 #45

merged 3 commits into from
Sep 21, 2019

Conversation

rosta
Copy link
Contributor

@rosta rosta commented Jul 29, 2019

Correction to reportLinesUnchanged / showInlineDiffs incompatibility

Possible implementation of rawValue option

rstawsk added 2 commits July 29, 2019 10:10
It appears that the configuration reportLinesUnchanged has no effect
when showInlineDiffs is true. That is '<' and '>' characters are
converted to HTML entities regardless.
@rosta
Copy link
Contributor Author

rosta commented Jul 31, 2019

I'm beginning to think that this might not be the best solution.

A better way forward might be to split the diffing and the formatting into two phases and let the client code call appropriate formatting routines directly. However that would mean that differences are calculated twice. Once when differences are found and classified, and once when the diff marker tags are interpolated into the formatted text.

Hmmm...

@wumpz
Copy link
Collaborator

wumpz commented Jul 31, 2019

The diffing and formatting are done in two phases, IMHO. How do you want to split it?

@rosta
Copy link
Contributor Author

rosta commented Aug 1, 2019

Yes, I hear what you say. I don't mean to dish what has already been done and works.

It's just that I haven't yet found how to get the output I need. Worse, I don't even know what that is exactly :-( I'll be looking at that this week. Please don't do anything with this PR for the moment until I can update it.

@wumpz
Copy link
Collaborator

wumpz commented Aug 1, 2019

Would it be an improvement, if you don't use the default line normalizer? LINE_NORMALIZER_FOR_HTML simply calls StringUtils::normalize. Without it, you would not have those html tags preprocessed. I know this is not a complete solution.

@rosta
Copy link
Contributor Author

rosta commented Aug 23, 2019

I rolled back most of the changes. Just left a single correction.

FI: I replaced the lineNormalizer in my code to the identity function, and renormalize afterwards.

Sorry to take so long with this but I had other things ongoing!

@wumpz wumpz merged commit c5b88e0 into java-diff-utils:master Sep 21, 2019
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