Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

feat: display edit history diff #922

Merged
merged 6 commits into from
Nov 10, 2023
Merged

Conversation

FineFindus
Copy link

Improves the status edit history by highlighting the text changes that have been made, closing #789.
It uses google's diff-match-path library, added text is shown in green, while removed text is shown in red with a strikethrough.

It also fixes a problem where the history could not be loaded if the status had a poll, because the poll ID was null.

Edit history with colored difference highlighting

There are still a few edge cases, such as HTML parsing breaking when a tag was edited. I'm not quite sure what the best solution is to fix this.

Edit history with broken element parsing

Also, the colors may need to be adjusted, as it may be hard to see single character edits in longer posts.

@sk22
Copy link
Owner

sk22 commented Nov 7, 2023

ohh neat, thank you! will merge this when i get to it

@sk22 sk22 merged commit 06698d3 into sk22:main Nov 10, 2023
1 check passed
@FineFindus FineFindus deleted the feat/edit-history-diff branch November 10, 2023 19:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants