diff2html icon indicating copy to clipboard operation
diff2html copied to clipboard

add ignore white spaces to side by side view

Open moehawamdeh opened this issue 3 years ago • 3 comments

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 (c1d670169950c2f8d71a8f691f7314263e2cc3b9). but I really think it makes sense to skip these context lines.

moehawamdeh avatar Apr 17 '22 22:04 moehawamdeh

👋 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?

rtfpessoa avatar May 07 '22 20:05 rtfpessoa

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?

moehawamdeh avatar May 15 '22 07:05 moehawamdeh

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?

rtfpessoa avatar Jun 03 '22 22:06 rtfpessoa