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

add ignore white spaces to side by side view #433

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

moehawamdeh
Copy link

@moehawamdeh moehawamdeh commented Apr 17, 2022

This is to add the functionality of ignoring white spaces, I added only to side by side view for demonstration purpose, the concept is to skip a line that has repeated space and both before and after changes takes place in same line.

To pass the all the unit tests I added reverted a commit that skips some context line when white spaces are ignored, as it makes the overall document more relevant (c1d6701). but I really think it makes sense to skip these context lines.

@rtfpessoa
Copy link
Owner

rtfpessoa commented May 7, 2022

👋 Sorry for the delay.
This is something that is usually available at the diff level (e.g.: git diff provides it OOTB) so I would think this is not something we should add to the tool.

Can you let me know what is the use case here?

@moehawamdeh
Copy link
Author

moehawamdeh commented May 15, 2022

wave Sorry for the delay. This is something that is usually available at the diff level (e.g.: git diff provides it OOTB) so I would think this is not something we should add to the tool.

Can you let me know what is the use case here?

Thanks for your response. Sometimes you have no complete control over generating the diff output, for example in my use case am getting it from Gitlab API which doesn't have the option to omit whitespace, one can argue that it's more reasonable to have Gitlab adding that to API, but I think its also a good option to have here at the plugin(one less api call), what do you think?

@rtfpessoa
Copy link
Owner

To accept this I will need both styles to support it. Side by side and line by line. And also to have some tests and see how it behaves in corner cases.
Can you start by showing some examples of how you would like it to behave?

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.

None yet

2 participants