Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: symfony/dom-crawler
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.0.11
Choose a base ref
...
head repository: symfony/dom-crawler
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.0.12
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Aug 3, 2022

  1. Copy the full SHA
    4b8daf6 View commit details
  2. Merge branch '4.4' into 5.4

    * 4.4:
      [DowCrawler] Fix locale-sensitivity of whitespace normalization
      suggest to install the Twig bundle when the required component is already installed
      Update PULL_REQUEST_TEMPLATE.md
    nicolas-grekas committed Aug 3, 2022
    Copy the full SHA
    291c1e9 View commit details

Commits on Aug 4, 2022

  1. Merge branch '5.4' into 6.0

    * 5.4:
      [String] Fix snake conversion
      [DowCrawler] Fix locale-sensitivity of whitespace normalization
      suggest to install the Twig bundle when the required component is already installed
      Update PULL_REQUEST_TEMPLATE.md
      [Serializer] Fix throwing right exception in ArrayDenormalizer with invalid type
    derrabus committed Aug 4, 2022
    Copy the full SHA
    c69331e View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 Crawler.php
2 changes: 1 addition & 1 deletion Crawler.php
Original file line number Diff line number Diff line change
@@ -555,7 +555,7 @@ public function text(string $default = null, bool $normalizeWhitespace = true):
$text = $this->getNode(0)->nodeValue;

if ($normalizeWhitespace) {
return trim(preg_replace('/(?:\s{2,}+|[^\S ])/', ' ', $text));
return trim(preg_replace("/(?:[ \n\r\t\x0C]{2,}+|[\n\r\t\x0C])/", ' ', $text), " \n\r\t\x0C");
}

return $text;