r82513 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82512‎ | r82513 | r82514 >
Date:16:29, 20 February 2011
Author:thomasv
Status:ok
Tags:
Comment:
fix regression in r73461: Use pre tag instead of p. Use equal sign instead of column
Modified paths:
  • /trunk/extensions/DoubleWiki/DoubleWiki_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DoubleWiki/DoubleWiki_body.php
@@ -26,13 +26,13 @@
2727 * Read the list of matched phrases and add tags to the html output.
2828 */
2929 function addMatchingTags ( &$text, $lang ) {
30 - $pattern = "/<div id=\"align-$lang\" style=\"display:none;\">\n<p>([^<]*?)<\/p>\n<\/div>/is";
 30+ $pattern = "/<div id=\"align-$lang\" style=\"display:none;\"><pre>(.*?)<\/pre>/is";
3131 $m = array();
3232 if ( ! preg_match( $pattern, $text, $m ) ) {
3333 return;
3434 }
3535 $text = str_replace( $m[1], '', $text );
36 - $line_pattern = '/\s*([^:\n]*?)\s*:\s*([^:\n]*?)\s*\n/i';
 36+ $line_pattern = '/\s*([^:\n]*?)\s*=\s*([^:\n]*?)\s*\n/i';
3737 $items = array();
3838 preg_match_all( $line_pattern, $m[1], $items, PREG_SET_ORDER );
3939 foreach ( $items as $n => $i ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r825331.17wmf1: MFT r78893, r78897, r78909, r82404, r82408, r82409, r82453, r82456,...catrope20:13, 20 February 2011
r82552close div forgotten in r82513; match new lines too.thomasv14:48, 21 February 2011
r85027MFT various extension fixes: r81713, r81742, r81743, r81908, r81966, r81969, ...demon18:23, 30 March 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r73461remove tag hook: it is better to use a templatethomasv15:44, 21 September 2010

Status & tagging log