Topic: Wiki page history compare doesn't seem to work properly anymore

Posted under Site Bug Reports & Feature Requests

All it does is highlight the entire previous version in red and then the current version in green, no matter what was changed. Not exactly helpful.

Works fine for me. What diff are you looking at that shows the comparison incorrectly?

lafcadio said:
Works fine for me. What diff are you looking at that shows the comparison incorrectly?

All of them. For example, this diff highlights all* previous content in light red and the actual changes in brighter red, and light green is unchanged content

​* except for that one line at the bottom

snpthecat said:
All of them. For example, this diff highlights all* previous content in light red and the actual changes in brighter red, and light green is unchanged content

​* except for that one line at the bottom

Perhaps only diffs created after a certain date? Checking the history for this recently edited page the most recent diff is broken, while all the older ones seem to work as expected.

faucet said:
Perhaps only diffs created after a certain date? Checking the history for this recently edited page the most recent diff is broken, while all the older ones seem to work as expected.

Checking more examples, it seems the issue wasn't as widespread as I thought (though there's this one) . It's always annoyed me when the entire page was highlighted in light green and duplicated again in light red for the massive wiki pages (I'm looking at you, avoid_posting (though it no longer has the issue, I remember when it definitely did))

Updated

lafcadio said:
Differences are bolded text. Additions are bold on green backgrounds, removals are bold on red backgrounds.
https://e621.net/wiki_page_versions/diff?otherpage=149104&thispage=117950

It should still only be highlighting lines that actually changed, not every single line like SNP's example. An example of working correctly here.

Unless there's something going on with different line endings, this is the only line that has actually changed:

$ diff 1.txt 2.txt
27c27
< Admins: "furrypickle":/users/105815, "Knotty Curls":/users/35757, "Rainbow Dash":/users/18776, "spe":/users/752426, "slyroon":/users/12286, "Xch3l":/users/41519
---
> Admins: "furrypickle":/users/105815, "Rainbow Dash":/users/18776, "spe":/users/752426, "Xch3l":/users/41519

Updated

Donovan DMC

Former Staff

Newline normalization was added recently, and it didn't have a fixer, so those changes are likely newline normalizations

So this is a change that's getting applied alongside the first edit that's made to every page since the code update, similar to how new aliases and implications only get applied with the next tag edit?

I wonder if there's a change that could be made to the diff code to ignore newline differences. Maybe by applying the same normalization to the old version after loading it and before doing the compare?

  • 1