-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improving the text compare feature #22
Comments
Content saved in "qa_edit_history":
Content in the qa_posts table:
|
Fair point, I'll see what i can do. Is there a reason the line breaks were changed? Is that something to do with the editor? |
Yes. As far as I could see, the sceditor formats the HTML content string. Doing indents and line breaks. See the plugin in my repo if you like to test. |
I would add a compare option:
|
Stackoverflow uses 3 compare modes, example: https://meta.stackoverflow.com/posts/256092/revisions |
I think a solution could be to remove all line breaks and then compare!
And then:
Result looks good: It should be checked if the post format is |
Another solution would be to remove all tabs and spaces from the beginning of each line. But I am not sure, what is best. The solution above is good for small texts. If it is a longer text, all is on one long line. Maybe a text only compare (using strip_tags) would be even sufficient? - But you would not see if images were removed or formatting like bold added etc. |
Example of recent version:
The plugin also considers line breaks (not the HTML ones, but ENTER key, next line) as change. I suggest to ignore those, to get a better overview.
The text was updated successfully, but these errors were encountered: