r14690 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14689‎ | r14690 | r14691 >
Date:21:59, 9 June 2006
Author:brion
Status:old
Tags:
Comment:
* Fix regression(?) in behavior of initial-whitespace-pre in <center>
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)
  • /trunk/phase3/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.txt
@@ -314,6 +314,20 @@
315315 !! end
316316
317317 !! test
 318+Regression with preformatted in <center>
 319+!! input
 320+<center>
 321+ Blah
 322+</center>
 323+!! result
 324+<center>
 325+<pre>Blah
 326+</pre>
 327+</center>
 328+
 329+!! end
 330+
 331+!! test
318332 <pre> with attributes (bug 3202)
319333 !! input
320334 <pre style="background: blue; color:white">Bluescreen of WikiDeath</pre>
Index: trunk/phase3/includes/Parser.php
@@ -1891,10 +1891,10 @@
18921892 wfProfileIn( "$fname-paragraph" );
18931893 # No prefix (not in list)--go to paragraph mode
18941894 // XXX: use a stack for nestable elements like span, table and div
1895 - $openmatch = preg_match('/(<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<center|<\\/tr|<\\/td|<\\/th)/iS', $t );
 1895+ $openmatch = preg_match('/(<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<\\/center|<\\/tr|<\\/td|<\\/th)/iS', $t );
18961896 $closematch = preg_match(
18971897 '/(<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
1898 - '<td|<th|<div|<\\/div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix.'-pre|<\\/li|<\\/ul|<\\/ol|<\\/center)/iS', $t );
 1898+ '<td|<th|<div|<\\/div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix.'-pre|<\\/li|<\\/ul|<\\/ol|<center)/iS', $t );
18991899 if ( $openmatch or $closematch ) {
19001900 $paragraphStack = false;
19011901 # TODO bug 5718: paragraph closed
Index: trunk/phase3/RELEASE-NOTES
@@ -469,6 +469,7 @@
470470 * (bug 6254) Update to Indonesian translation (id) #20
471471 * (bug 6255) Fix transclusions starting with "#" or "*" in HTML attributes
472472 * Whitespace now normalized more or less properly in HTML attributes
 473+* Fix regression(?) in behavior of initial-whitespace-pre in <center>
473474
474475
475476 == Compatibility ==

Follow-up revisions

RevisionCommit summaryAuthorDate
r18403Change the regexen in doBlockLevels() to handle <center> tags the same as...vyznev16:51, 17 December 2006

Status & tagging log