From 80f77ea7013b80e8a51d049f75785a113f87559b Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 4 Feb 2024 19:47:27 +0200 Subject: [PATCH] remove extra spaces --- src/Dokuwiki/Reader.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Dokuwiki/Reader.php b/src/Dokuwiki/Reader.php index 85a37d7..dd9ef30 100644 --- a/src/Dokuwiki/Reader.php +++ b/src/Dokuwiki/Reader.php @@ -36,12 +36,15 @@ class Reader '/\%\%/' => '', '/\/\//' => '', + // Remove extra spaces + '/(\s)\s+/' => '$1', + // Links /// Detect IPv6 (used as no idea how to resolve square quotes in rules below) '/\[\[([^\[]+)\[([A-f:0-9]*)\]([^\]]+)\]\]/' => '$1~IPv6:open~$2~IPv6:close~$3', - /// Remove extras + /// Remove extra chars '/\[\[\s*\:?([^\|]+)\s*\|\s*([^\]]+)\s*\]\]/' => '[[$1|$2]]', '/\[\[\s*\:?([^\]]+)\s*\]\]/' => '[[$1]]',