aboutsummaryrefslogtreecommitdiffstats
path: root/includes/parser/DateFormatter.php
diff options
context:
space:
mode:
authorAndrew Garrett <werdna@users.mediawiki.org>2009-04-24 04:01:24 +0000
committerAndrew Garrett <werdna@users.mediawiki.org>2009-04-24 04:01:24 +0000
commit6de14e92467406c4c66813aae70ffa05a03bd49d (patch)
treee607ba1542be8e4d7d6c26b8d4f480bcb8d2c4c2 /includes/parser/DateFormatter.php
parent155ddf6de4a2aa68dcdd8ca7d0f9db21ced4b228 (diff)
downloadmediawikicore-6de14e92467406c4c66813aae70ffa05a03bd49d.tar.gz
mediawikicore-6de14e92467406c4c66813aae70ffa05a03bd49d.zip
Fix spacing issues with autoformatted dates. Includes a parser test for the specific failure case which was fixed.
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/49794
Diffstat (limited to 'includes/parser/DateFormatter.php')
-rw-r--r--includes/parser/DateFormatter.php8
1 files changed, 4 insertions, 4 deletions
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}";