From 93c6e6434bdb9d86cc9c1e6e5766cf71a0ce2f59 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 4 Oct 2025 03:58:32 +0200 Subject: [PATCH] Remove deprecated `collapseWhitespace` Fixes: https://github.com/microformats/php-mf2/issues/253 --- Mf2/Parser.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Mf2/Parser.php b/Mf2/Parser.php index c7cc02d..2f25029 100644 --- a/Mf2/Parser.php +++ b/Mf2/Parser.php @@ -96,20 +96,6 @@ function unicodeToHtmlEntities($input) { return mb_convert_encoding($input, 'HTML-ENTITIES', mb_detect_encoding($input)); } -/** - * Collapse Whitespace - * - * Collapses any sequences of whitespace within a string into a single space - * character. - * - * @deprecated since v0.2.3 - * @param string $str - * @return string - */ -function collapseWhitespace($str) { - return preg_replace('/[\s|\n]+/', ' ', $str); -} - function unicodeTrim($str) { // this is cheating. TODO: find a better way if this causes any problems $str = str_replace(mb_convert_encoding(' ', 'UTF-8', 'HTML-ENTITIES'), ' ', $str);