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/checks(.:format)
route-controllerpull_requests
route-actionchecks
fetch-noncev2:541a195b-3a47-b33d-6597-4ee62e9f410d
current-catalog-service-hash87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a
request-idCE28:495BB:C3E55C:10D914B:69689E33
html-safe-nonce2f90afc424246b96ad7d534e9350c43c677043d2bd9c488a2e337326823fd20d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTI4OjQ5NUJCOkMzRTU1QzoxMEQ5MTRCOjY5Njg5RTMzIiwidmlzaXRvcl9pZCI6Ijg1MzA5OTMwMzA5ODg2MDI5MzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac1298c07591ec08298187e1ed37e7a0aef808d22e873679aad5bfdd13f0f19a68
hovercard-subject-tagpull_request:3055657713
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/checks
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/java-diff-utils/java-diff-utils/pull/224/checks
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
Nonefdc7c66bd36a6c12eb8e771e806db863266e573fc299e77f27505a768d4f8a98
turbo-cache-controlno-cache
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 full-width-p-0
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3223a6503d318917691422cdadfbe16cd8fb21e5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/java-diff-utils/java-diff-utils/pull/224/checks#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%2Fchecks
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%2Fchecks
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%2Fchecks&source=header-repo&source_repo=java-diff-utils%2Fjava-diff-utils
Reloadhttps://github.com/java-diff-utils/java-diff-utils/pull/224/checks
Reloadhttps://github.com/java-diff-utils/java-diff-utils/pull/224/checks
Reloadhttps://github.com/java-diff-utils/java-diff-utils/pull/224/checks
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/checks
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/checks
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 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/checks
Please reload this pagehttps://github.com/java-diff-utils/java-diff-utils/pull/224/checks
Sign in for the full log viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjava-diff-utils%2Fjava-diff-utils%2Fpull%2F224%2Fchecks
Fix: Ensure equalities processed via new processEqualities hook (Fixes #219) https://github.com/java-diff-utils/java-diff-utils/pull/224/checks#top
Please reload this pagehttps://github.com/java-diff-utils/java-diff-utils/pull/224/checks
Java CI with Maven on: pull_request https://github.com/java-diff-utils/java-diff-utils/actions/runs/19785046529
Java 8 building ... https://github.com/java-diff-utils/java-diff-utils/actions/runs/19785046529/job/57709573536?pr=224
Java 11 building ... https://github.com/java-diff-utils/java-diff-utils/actions/runs/19785046529/job/57709573513?pr=224
Java 17 building ... https://github.com/java-diff-utils/java-diff-utils/actions/runs/19785046529/job/57709573514?pr=224
Codacy Static Code Analysis https://github.com/java-diff-utils/java-diff-utils/pull/224/checks?check_run_id=56690394611
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.