r8854 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r8853‎ | r8854 | r8855 >
Date:01:53, 4 May 2005
Author:avar
Status:old
Tags:
Comment:
* Changed [0-9] to \d in the ndash converter.
Modified paths:
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -208,7 +208,7 @@
209209
210210 $dashReplace = array(
211211 '/ - /' => " – ", # N dash
212 - '/(?<=[0-9])-(?=[0-9])/' => "&ndash;", # N dash between numbers
 212+ '/(?<=[\d])-(?=[\d])/' => "&ndash;", # N dash between numbers
213213 '/ -- /' => "&nbsp;&mdash; " # M dash
214214 );
215215 $text = preg_replace( array_keys($dashReplace), array_values($dashReplace), $text );

Status & tagging log