Stop after replaceing the first instance

This commit is contained in:
Platonides 2011-03-27 17:18:52 +00:00
parent d193b03c81
commit a051fe15d3

View file

@ -270,7 +270,7 @@ class DjVuImage {
EOR;
$txt = preg_replace_callback( $reg, array( $this, 'pageTextCallback' ), $txt );
$txt = "<DjVuTxt>\n<HEAD></HEAD>\n<BODY>\n" . $txt . "</BODY>\n</DjVuTxt>\n";
$xml = preg_replace( "/<DjVuXML>/", "<mw-djvu><DjVuXML>", $xml );
$xml = preg_replace( "/<DjVuXML>/", "<mw-djvu><DjVuXML>", $xml, 1 );
$xml = $xml . $txt. '</mw-djvu>' ;
}
}