Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -7309,6 +7309,17 @@ |
7310 | 7310 | </p> |
7311 | 7311 | !! end |
7312 | 7312 | |
| 7313 | +!! test |
| 7314 | +Spacing of numbers in formatted dates (linked) |
| 7315 | +!! config |
| 7316 | +wgUseDynamicDates=true |
| 7317 | +!! input |
| 7318 | +[[January 15]] |
| 7319 | +!! result |
| 7320 | +<p><span class="mw-formatted-date" title="01-15"><a href="https://www.mediawiki.org/index.php?title=January_15&action=edit&redlink=1" class="new" title="January 15 (page does not exist)">January 15</a></span> |
| 7321 | +</p> |
| 7322 | +!! end |
| 7323 | + |
7313 | 7324 | # |
7314 | 7325 | # |
7315 | 7326 | # |
Index: trunk/phase3/includes/parser/DateFormatter.php |
— | — | @@ -48,10 +48,10 @@ |
49 | 49 | $this->prxISO2 = '\[\[(-?\d{4})-(\d{2})-(\d{2})\]\]'; |
50 | 50 | |
51 | 51 | # Real regular expressions |
52 | | - $this->regexes[self::DMY] = "/{$this->prxDM}( *, *| +){$this->prxY}{$this->regexTrail}"; |
53 | | - $this->regexes[self::YDM] = "/{$this->prxY}( *, *| +){$this->prxDM}{$this->regexTrail}"; |
54 | | - $this->regexes[self::MDY] = "/{$this->prxMD}( *, *| +){$this->prxY}{$this->regexTrail}"; |
55 | | - $this->regexes[self::YMD] = "/{$this->prxY}( *, *| +){$this->prxMD}{$this->regexTrail}"; |
| 52 | + $this->regexes[self::DMY] = "/{$this->prxDM}(?: *, *| +){$this->prxY}{$this->regexTrail}"; |
| 53 | + $this->regexes[self::YDM] = "/{$this->prxY}(?: *, *| +){$this->prxDM}{$this->regexTrail}"; |
| 54 | + $this->regexes[self::MDY] = "/{$this->prxMD}(?: *, *| +){$this->prxY}{$this->regexTrail}"; |
| 55 | + $this->regexes[self::YMD] = "/{$this->prxY}(?: *, *| +){$this->prxMD}{$this->regexTrail}"; |
56 | 56 | $this->regexes[self::DM] = "/{$this->prxDM}{$this->regexTrail}"; |
57 | 57 | $this->regexes[self::MD] = "/{$this->prxMD}{$this->regexTrail}"; |
58 | 58 | $this->regexes[self::ISO1] = "/{$this->prxISO1}{$this->regexTrail}"; |