Implement spaceMatching config to detect space changes in HTML diffs #141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The library was normalizing all whitespace (including
entities), making it impossible to detect when spaces were added or removed from HTML text.Changes
AbstractDiff::convertHtmlToListOfWords(): Conditionally preserve non-breaking spaces (\xc2\xa0) whenspaceMatchingis enabledAbstractDiff::normalizeWhitespaceInHtmlSentence(): Skip collapsing multiple consecutive spaces whenspaceMatchingis enabled (still normalizes newlines)nbsp-spaces-added.htmlvalidates space detection,nbsp-spaces-default-behavior.htmlvalidates backward compatibilityUsage
The
spaceMatchingoption defaults tofalse, preserving existing behavior.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/doctrine/cache/zipball/56cd022adb5514472cb144c087393c1821911d09/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/o8M0vS /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/wh8Yuv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/ezyang/htmlpurifier/zipball/b287d2a16aceffbf6e0295559b39662612b77fcf/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/o8M0vS /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/wh8Yuv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/o8M0vS /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/wh8Yuv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/o8M0vS /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/wh8Yuv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/phpunit/zipball/945d0b7f346a084ce5549e95289962972c4272e5/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/wh8Yuv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/539c6691e0623af6dc6f9c20384c120f963465a0/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/o8M0vS /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/wh8Yuv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/o8M0vS /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/wh8Yuv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/o8M0vS /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/wh8Yuv /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/o8M0vS /usr/bin/composer install(http block)/usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/wh8Yuv /usr/bin/composer install --no-interaction(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.