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

Are there any way to show content even when no diffs contained? #83

Closed
kyasbal opened this issue May 2, 2024 · 2 comments
Closed

Are there any way to show content even when no diffs contained? #83

kyasbal opened this issue May 2, 2024 · 2 comments

Comments

@kyasbal
Copy link

kyasbal commented May 2, 2024

In the current implementation of unified-diff, ngx-diff shows There are no changes to display. and hide contents.
This is good for some application, but there would be an application want to show lines with white background to keep consistency of views between the other pairs containing actual diff.

Are there any way to do this?

@rars
Copy link
Owner

rars commented Jun 6, 2024

Hi @kyasbal. There isn't a way to do this currently. I'm not sure there is a wide need to support this, as this is the first time I have been asked for this. This library's scope is for viewing differences between text and not as a general text viewer. If two pieces of text are the same, the assumption in this library is that it will be omitted completely to avoid cluttering the display with lots of things that have stayed the same, especially if the number of things that have stayed the same is large. Consequently, I don't really expect the 'There are no changes to display' to be encountered very often either. Sorry that doesn't solve your issue but hope it explains my thinking.

@kyasbal
Copy link
Author

kyasbal commented Jun 6, 2024

Thank you for your reply. I understood your points.
I really appreciate you to develop and maintain this useful OSS.😄

Closing this issue.

@kyasbal kyasbal closed this as completed Jun 6, 2024
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

No branches or pull requests

2 participants