-
Notifications
You must be signed in to change notification settings - Fork 104
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
Multiline diff formatting improvements #137
Conversation
- mark modified lines - fix <pre> whitespace
@jedie Thanks for this super handy module :) Opening this as a preliminary PR tp get some input on these changes. I'm happy to round it out with tests etc whatever is needed to move forward. Curious to hear your thoughts when you've had a chance to take a look. |
Your example output looks great👌 |
I've removed the |
I need to revisit some of the test case changes to make sure the added |
Quick update: There are still some issues with newline insertions/deletions that I need to investigate, so this is still a work-in-progress. |
Current status:
Screenshot of the diff visualization generated by f07ba91: |
Okay, I think this is good to go :) Tests are passing locally for me but seem to be affected by the same issue on TravisCI that's also breaking master. |
@@ -104,7 +105,7 @@ class VariantModel(models.Model): | |||
|
|||
TEST_CHOICES = (("a", "alpha"), ("b", "bravo")) | |||
boolean = models.BooleanField(default=True) | |||
null_boolean = models.NullBooleanField() | |||
null_boolean = models.BooleanField(null=True) if DJANGO_VERSION[0] >= 3 else models.NullBooleanField() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jedie FYI this is unrelated to the diff changes, but it fixes a deprecation warning that was causing a test failure.
can you rebase? |
@jedie This should be ready to go -- just wanted to check in to see if you needed anything else from me to move forward? (no rush obviously, I know you're busy) |
Squashed commit of the following: commit d48d60cb40090c7fb2c8b6a97a134100e12f07a0 Author: Dan Bader <[email protected]> Date: Mon Dec 14 09:55:24 2020 -0800 Make diff lines full-width commit b17c63359dcbd9ac0c704a18c11875202d7d7fbe Author: Dan Bader <[email protected]> Date: Sun Dec 13 18:51:59 2020 -0800 Cleanup; add docstrings commit ad0383cdc4e1822d014483839c7d69e9747c0548 Author: Dan Bader <[email protected]> Date: Sun Dec 13 12:59:45 2020 -0800 Update diff color scheme commit 9f4ac80d2991dbb8c87614ad1d4388711cbc0e4e Author: Dan Bader <[email protected]> Date: Sun Dec 13 12:59:28 2020 -0800 Fix diff_match_patch_pretty_html HTML spans commit 1ed6665be6f4359b8a89e153383fc9f6b89cbe4b Author: Dan Bader <[email protected]> Date: Sat Dec 12 16:39:05 2020 -0800 Fix line end handling, update tests commit 111e59b08b55a6f05d431dfc26df5a805cfe7b31 Author: Dan Bader <[email protected]> Date: Sat Dec 12 16:10:35 2020 -0800 Update test_variant_model.py commit dd7fc4d1499395bcb6e76233e5529958f236665a Author: Dan Bader <[email protected]> Date: Sat Dec 12 16:10:18 2020 -0800 Fix NullBooleanField deprecation warning commit 13a38f6728365b7fad52df4cba9c6af004493dc0 Author: Dan Bader <[email protected]> Date: Sat Dec 12 11:33:46 2020 -0800 Update test_helpers.py commit ca21fa765580f066542b0da343638803e3d85d7b Author: Dan Bader <[email protected]> Date: Sat Dec 12 10:24:00 2020 -0800 Diff viewer improvements: Don't assume \r\n line endings commit 173429c8321e1530eb31988fde6880c245cb25f3 Author: Dan Bader <[email protected]> Date: Fri Dec 11 18:03:33 2020 -0800 Multiline diff improvements - mark modified lines - fix <pre> whitespace
Some small code changes and the squashed commits of the following: commit d48d60cb40090c7fb2c8b6a97a134100e12f07a0 Author: Dan Bader <[email protected]> Date: Mon Dec 14 09:55:24 2020 -0800 Make diff lines full-width commit b17c63359dcbd9ac0c704a18c11875202d7d7fbe Author: Dan Bader <[email protected]> Date: Sun Dec 13 18:51:59 2020 -0800 Cleanup; add docstrings commit ad0383cdc4e1822d014483839c7d69e9747c0548 Author: Dan Bader <[email protected]> Date: Sun Dec 13 12:59:45 2020 -0800 Update diff color scheme commit 9f4ac80d2991dbb8c87614ad1d4388711cbc0e4e Author: Dan Bader <[email protected]> Date: Sun Dec 13 12:59:28 2020 -0800 Fix diff_match_patch_pretty_html HTML spans commit 1ed6665be6f4359b8a89e153383fc9f6b89cbe4b Author: Dan Bader <[email protected]> Date: Sat Dec 12 16:39:05 2020 -0800 Fix line end handling, update tests commit 111e59b08b55a6f05d431dfc26df5a805cfe7b31 Author: Dan Bader <[email protected]> Date: Sat Dec 12 16:10:35 2020 -0800 Update test_variant_model.py commit dd7fc4d1499395bcb6e76233e5529958f236665a Author: Dan Bader <[email protected]> Date: Sat Dec 12 16:10:18 2020 -0800 Fix NullBooleanField deprecation warning commit 13a38f6728365b7fad52df4cba9c6af004493dc0 Author: Dan Bader <[email protected]> Date: Sat Dec 12 11:33:46 2020 -0800 Update test_helpers.py commit ca21fa765580f066542b0da343638803e3d85d7b Author: Dan Bader <[email protected]> Date: Sat Dec 12 10:24:00 2020 -0800 Diff viewer improvements: Don't assume \r\n line endings commit 173429c8321e1530eb31988fde6880c245cb25f3 Author: Dan Bader <[email protected]> Date: Fri Dec 11 18:03:33 2020 -0800 Multiline diff improvements - mark modified lines - fix <pre> whitespace
Multiline diff formatting improvements #137
I merged your code via #144 (I made some additional small changes) |
merged and release with v0.13.1 |
I've been working on some improvements to make the diff viewer experience better. This changeset fixes whitespace rendering if there are leading whitespace characters on a line and there are also visual changes to make it easier to see which lines have changed in a multiline diff.
Changes:
Before:
After: