Skip to content

Commit 8cb4c6e

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: [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
2 parents 58eb985 + c69331e commit 8cb4c6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ public function text(string $default = null, bool $normalizeWhitespace = true):
555555
$text = $this->getNode(0)->nodeValue;
556556

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

561561
return $text;

0 commit comments

Comments
 (0)