René's URL Explorer Experiment


Title: Fix: Ensure equalities processed via new processEqualities hook (Fixes #219) by tusharsoni52 · Pull Request #224 · java-diff-utils/java-diff-utils · GitHub

Open Graph Title: Fix: Ensure equalities processed via new processEqualities hook (Fixes #219) by tusharsoni52 · Pull Request #224 · java-diff-utils/java-diff-utils

X Title: Fix: Ensure equalities processed via new processEqualities hook (Fixes #219) by tusharsoni52 · Pull Request #224 · java-diff-utils/java-diff-utils

Description: Summary This PR introduces a new extension point, processEqualities(), inside DiffRowGenerator to address the HTML-escaping issue described in #219. Previously, equal (unchanged) segments were passed through HTML normalization only once. Because < and > were normalized to &lt; and &gt;, equalities that began with & caused incorrect inline diff grouping (e.g., &lt; vs &gt;). This produced invalid HTML when inlineDiffByWord(true) was used. What This PR Changes ✔ Adds a new protected hook: protected String processEqualities(String text) ✔ All equality chunks now pass through this hook before becoming DiffRow(Tag.EQUAL, ...). ✔ Default behavior is no modification (fully backward compatible). ✔ Users can override this hook to customize HTML or text transformations after diffing, solving the core issue. Why this Fix Works The problem in #219 occurs because the diff logic compares normalized text, but the final output does not normalize equal segments the same way as diffs. By exposing processEqualities(), we give users a consistent post-diff transformation path. This ensures that equal text is handled symmetrically to diffed text and prevents HTML-breaking cases like &lt; / &gt; being partially diffed. Backward Compatibility Existing behavior is preserved. No breaking API changes. The feature is opt-in — users override it only if needed. Tests Included ✔ Added DiffRowGeneratorEqualitiesTest ✔ Verifies that: Equalities now route through processEqualities() Inline diffs still work correctly The issue #219 reproduction scenario no longer produces broken HTML Fixes Fixes #219

Open Graph Description: Summary This PR introduces a new extension point, processEqualities(), inside DiffRowGenerator to address the HTML-escaping issue described in #219. Previously, equal (unchanged) segments were pass...

X Description: Summary This PR introduces a new extension point, processEqualities(), inside DiffRowGenerator to address the HTML-escaping issue described in #219. Previously, equal (unchanged) segments were pass...

Opengraph URL: https://github.com/java-diff-utils/java-diff-utils/pull/224

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:8d03b534-62b2-4b47-0b6d-cd19a7891760
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBE52:22117D:98F9E0:D53185:6968D660
html-safe-noncefbdd6632f5c07b219f7ee83128f3cf2a720fc5f0e1fde1286bff03543136a265
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTUyOjIyMTE3RDo5OEY5RTA6RDUzMTg1OjY5NjhENjYwIiwidmlzaXRvcl9pZCI6IjUyOTEwOTY4NTUxMTY1NjgxNjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacccd1e1edf5dd27ff98c9576230ae25f8e093eddaab04a58f537cd4fc4288e84c
hovercard-subject-tagpull_request:3055657713
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/java-diff-utils/java-diff-utils/pull/224/files
twitter:imagehttps://avatars.githubusercontent.com/u/116971475?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/116971475?s=400&v=4
og:image:altSummary This PR introduces a new extension point, processEqualities(), inside DiffRowGenerator to address the HTML-escaping issue described in #219. Previously, equal (unchanged) segments were pass...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3c4e9f2fc1db52c609205138be6a397cfde4574cb54d53015014de30dd49f27e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/java-diff-utils/java-diff-utils git https://github.com/java-diff-utils/java-diff-utils.git
octolytics-dimension-user_id40540835
octolytics-dimension-user_loginjava-diff-utils
octolytics-dimension-repository_id86663812
octolytics-dimension-repository_nwojava-diff-utils/java-diff-utils
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id86663812
octolytics-dimension-repository_network_root_nwojava-diff-utils/java-diff-utils
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release1fb1ea11f8c37dd4dd50347cca70d89824e93788
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/java-diff-utils/java-diff-utils/pull/224/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjava-diff-utils%2Fjava-diff-utils%2Fpull%2F224%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjava-diff-utils%2Fjava-diff-utils%2Fpull%2F224%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=java-diff-utils%2Fjava-diff-utils
Reloadhttps://github.com/java-diff-utils/java-diff-utils/pull/224/files
Reloadhttps://github.com/java-diff-utils/java-diff-utils/pull/224/files
Reloadhttps://github.com/java-diff-utils/java-diff-utils/pull/224/files
java-diff-utils https://github.com/java-diff-utils
java-diff-utilshttps://github.com/java-diff-utils/java-diff-utils
Please reload this pagehttps://github.com/java-diff-utils/java-diff-utils/pull/224/files
Notifications https://github.com/login?return_to=%2Fjava-diff-utils%2Fjava-diff-utils
Fork 215 https://github.com/login?return_to=%2Fjava-diff-utils%2Fjava-diff-utils
Star 1.5k https://github.com/login?return_to=%2Fjava-diff-utils%2Fjava-diff-utils
Code https://github.com/java-diff-utils/java-diff-utils
Issues 1 https://github.com/java-diff-utils/java-diff-utils/issues
Pull requests 1 https://github.com/java-diff-utils/java-diff-utils/pulls
Discussions https://github.com/java-diff-utils/java-diff-utils/discussions
Actions https://github.com/java-diff-utils/java-diff-utils/actions
Projects 0 https://github.com/java-diff-utils/java-diff-utils/projects
Wiki https://github.com/java-diff-utils/java-diff-utils/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/java-diff-utils/java-diff-utils/security
Please reload this pagehttps://github.com/java-diff-utils/java-diff-utils/pull/224/files
Insights https://github.com/java-diff-utils/java-diff-utils/pulse
Code https://github.com/java-diff-utils/java-diff-utils
Issues https://github.com/java-diff-utils/java-diff-utils/issues
Pull requests https://github.com/java-diff-utils/java-diff-utils/pulls
Discussions https://github.com/java-diff-utils/java-diff-utils/discussions
Actions https://github.com/java-diff-utils/java-diff-utils/actions
Projects https://github.com/java-diff-utils/java-diff-utils/projects
Wiki https://github.com/java-diff-utils/java-diff-utils/wiki
Security https://github.com/java-diff-utils/java-diff-utils/security
Insights https://github.com/java-diff-utils/java-diff-utils/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fjava-diff-utils%2Fjava-diff-utils%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fjava-diff-utils%2Fjava-diff-utils%2Fissues%2Fnew%2Fchoose
wumpzhttps://github.com/wumpz
java-diff-utils:masterhttps://github.com/java-diff-utils/java-diff-utils/tree/master
tusharsoni52:fix-219-option3https://github.com/tusharsoni52/java-diff-utils/tree/fix-219-option3
Conversation 1 https://github.com/java-diff-utils/java-diff-utils/pull/224
Commits 1 https://github.com/java-diff-utils/java-diff-utils/pull/224/commits
Checks 4 https://github.com/java-diff-utils/java-diff-utils/pull/224/checks
Files changed 2 https://github.com/java-diff-utils/java-diff-utils/pull/224/files
Fix: Ensure equalities processed via new processEqualities hook (Fixes #219) https://github.com/java-diff-utils/java-diff-utils/pull/224/files#top
Show all changes 1 commit https://github.com/java-diff-utils/java-diff-utils/pull/224/files
408c47e feat(diffrow): add processEqualities hook and ensure equalities are p… Nov 29, 2025 https://github.com/java-diff-utils/java-diff-utils/pull/224/commits/408c47ee550a11b80bcb504d9f6d231a1c1d8cc0
Clear filters https://github.com/java-diff-utils/java-diff-utils/pull/224/files
Please reload this pagehttps://github.com/java-diff-utils/java-diff-utils/pull/224/files
Please reload this pagehttps://github.com/java-diff-utils/java-diff-utils/pull/224/files
DiffRowGenerator.java https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
DiffRowGeneratorEqualitiesTest.java https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-0684d250d1cf3bd3bc7440b8dabdc7013d26fa0684dfdcfa7c81c75279264039
java-diff-utils/src/main/java/com/github/difflib/text/DiffRowGenerator.javahttps://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
View file https://github.com/tusharsoni52/java-diff-utils/blob/408c47ee550a11b80bcb504d9f6d231a1c1d8cc0/java-diff-utils/src/main/java/com/github/difflib/text/DiffRowGenerator.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/java-diff-utils/java-diff-utils/pull/224/{{ revealButtonHref }}
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
https://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-7d9ffd266b84b54c31e75e0074d6fcfd21edbd1d6005ca8b3158e507659489b1
java-diff-utils/src/test/java/com/github/difflib/text/DiffRowGeneratorEqualitiesTest.javahttps://github.com/java-diff-utils/java-diff-utils/pull/224/files#diff-0684d250d1cf3bd3bc7440b8dabdc7013d26fa0684dfdcfa7c81c75279264039
View file https://github.com/tusharsoni52/java-diff-utils/blob/408c47ee550a11b80bcb504d9f6d231a1c1d8cc0/java-diff-utils/src/test/java/com/github/difflib/text/DiffRowGeneratorEqualitiesTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/java-diff-utils/java-diff-utils/pull/224/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.