Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-134580: Modernizingdifflib.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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
Wulian233 commentedMay 23, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 in1288aa1
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 :) |
Uh oh!
There was an error while loading.Please reload this page.
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/