-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
gh-134580: Modernizing difflib.HtmlDiff
for HTML Output
#134581
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
Conversation
It's a good improvement, and this is what it looks like now
I before thought about this, but the table width is determined based on the length of the content and the code specified, like cpython/Lib/test/test_difflib.py Line 227 in 1288aa1
If we center the table, there will be a lot of space on both sides of the screen, and it may not be as easy to distinguish as if the table is narrow. So I didn't do that, and my opinion is also to keep the left alignment the way :) |
Head branch was pushed to by a user without write access
…on#134581) Co-authored-by: Hugo van Kemenade <[email protected]>
…on#134581) Co-authored-by: Hugo van Kemenade <[email protected]>
Improved the styling of HTML diff pages generated by the difflib.HtmlDiff` class, and migrated the output to the HTML5 standard.
And all browser warnings have been eliminated.
details see: #134580
Request review @hugovk thanks!
Screenshot:
After:

Before:

After:

difflib.HtmlDiff
for HTML Output #134580📚 Documentation preview 📚: https://cpython-previews--134581.org.readthedocs.build/