r32960 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32959‎ | r32960 | r32961 >
Date:15:43, 8 April 2008
Author:sanbeg
Status:old
Tags:
Comment:
fix problem with leading spaces in compact poems, fix a few regression tests that changes slightly due to new preprocessor(?)
Modified paths:
  • /trunk/extensions/Poem/Poem.php (modified) (history)
  • /trunk/extensions/Poem/poemParserTests.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/Poem/Poem.php
@@ -46,13 +46,13 @@
4747 $tag = $parser->insertStripItem( "<br />", $parser->mStripState );
4848 $text = preg_replace(
4949 array( "/^\n/", "/\n$/D", "/\n/", "/^( +)/me" ),
50 - array( "", "", "$tag$nl", "str_replace(' ','&nbsp;','\\1')" ),
 50+ array( "", "", "$tag\n", "str_replace(' ','&nbsp;','\\1')" ),
5151 $in );
5252 $text = $parser->recursiveTagParse( $text );
5353 } else {
5454 $text = preg_replace(
5555 array( "/^\n/", "/\n$/D", "/\n/", "/^( +)/me" ),
56 - array( "", "", "<br />$nl", "str_replace(' ','&nbsp;','\\1')" ),
 56+ array( "", "", "<br />\n", "str_replace(' ','&nbsp;','\\1')" ),
5757 $in );
5858 $ret = $parser->parse(
5959 $text,
Index: trunk/extensions/Poem/poemParserTests.txt
@@ -113,6 +113,7 @@
114114 is<br />
115115 a<br />
116116 test<br />
 117+
117118 </p>
118119 </div>
119120
@@ -134,6 +135,7 @@
135136 '''is'''<br />
136137 a<br />
137138 test<br />
 139+
138140 </p>
139141 </div>
140142

Status & tagging log