From 6de14e92467406c4c66813aae70ffa05a03bd49d Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 24 Apr 2009 04:01:24 +0000 Subject: Fix spacing issues with autoformatted dates. Includes a parser test for the specific failure case which was fixed. --- includes/parser/DateFormatter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/parser/DateFormatter.php') diff --git a/includes/parser/DateFormatter.php b/includes/parser/DateFormatter.php index aa6415e47aed..9bd6c68a3ed5 100644 --- a/includes/parser/DateFormatter.php +++ b/includes/parser/DateFormatter.php @@ -48,10 +48,10 @@ class DateFormatter $this->prxISO2 = '\[\[(-?\d{4})-(\d{2})-(\d{2})\]\]'; # Real regular expressions - $this->regexes[self::DMY] = "/{$this->prxDM} *,? *{$this->prxY}{$this->regexTrail}"; - $this->regexes[self::YDM] = "/{$this->prxY} *,? *{$this->prxDM}{$this->regexTrail}"; - $this->regexes[self::MDY] = "/{$this->prxMD} *,? *{$this->prxY}{$this->regexTrail}"; - $this->regexes[self::YMD] = "/{$this->prxY} *,? *{$this->prxMD}{$this->regexTrail}"; + $this->regexes[self::DMY] = "/{$this->prxDM}( *, *| +){$this->prxY}{$this->regexTrail}"; + $this->regexes[self::YDM] = "/{$this->prxY}( *, *| +){$this->prxDM}{$this->regexTrail}"; + $this->regexes[self::MDY] = "/{$this->prxMD}( *, *| +){$this->prxY}{$this->regexTrail}"; + $this->regexes[self::YMD] = "/{$this->prxY}( *, *| +){$this->prxMD}{$this->regexTrail}"; $this->regexes[self::DM] = "/{$this->prxDM}{$this->regexTrail}"; $this->regexes[self::MD] = "/{$this->prxMD}{$this->regexTrail}"; $this->regexes[self::ISO1] = "/{$this->prxISO1}{$this->regexTrail}"; -- cgit v1.2.3