r52053 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52052‎ | r52053 | r52054 >
Date:17:02, 17 June 2009
Author:thomasv
Status:ok
Tags:
Comment:
fix regexp : oddly, the margin value may be negative
Modified paths:
  • /trunk/phase3/includes/DjVuImage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DjVuImage.php
@@ -251,7 +251,7 @@
252252 wfProfileOut( 'djvutxt' );
253253 if( $retval == 0) {
254254 $txt = htmlspecialchars($txt);
255 - $txt = preg_replace( "/\((page\s\d*\s\d*\s\d*\s\d*\s*\&quot;([^<]*?)\&quot;\s*|)\)/s", "<PAGE value=\"$2\" />", $txt );
 255+ $txt = preg_replace( "/\((page\s[\d-]*\s[\d-]*\s[\d-]*\s[\d-]*\s*\&quot;([^<]*?)\&quot;\s*|)\)/s", "<PAGE value=\"$2\" />", $txt );
256256 $txt = "<DjVuTxt>\n<HEAD></HEAD>\n<BODY>\n" . $txt . "</BODY>\n</DjVuTxt>\n";
257257 $xml = preg_replace( "/<DjVuXML>/", "<mw-djvu><DjVuXML>", $xml );
258258 $xml = $xml . $txt. '</mw-djvu>' ;

Status & tagging log