r75909 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75908‎ | r75909 | r75910 >
Date:05:33, 3 November 2010
Author:tstarling
Status:ok
Tags:
Comment:
MFT r65039, r65160: fix "Leave it as TeX" math rendering mode, which was causing bugs due to interaction with doBlockLevels().
Modified paths:
  • /branches/wmf/1.16wmf4/includes/Math.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/includes/Math.php
@@ -37,7 +37,8 @@
3838
3939 if( $this->mode == MW_MATH_SOURCE ) {
4040 # No need to render or parse anything more!
41 - return ('$ '.htmlspecialchars( $this->tex ).' $');
 41+ # New lines are replaced with spaces, which avoids confusing our parser (bugs 23190, 22818)
 42+ return ('<span class="tex">$ ' . str_replace( "\n", " ", htmlspecialchars( $this->tex ) ) . ' $</span>');
4243 }
4344 if( $this->tex == '' ) {
4445 return; # bug 8372
Property changes on: branches/wmf/1.16wmf4/includes/Math.php
___________________________________________________________________
Added: svn:mergeinfo
4546 Merged /branches/wmf-deployment/includes/Math.php:r53381,60970
4647 Merged /branches/REL1_15/phase3/includes/Math.php:r51646
4748 Merged /branches/sqlite/includes/Math.php:r58211-58321
4849 Merged /trunk/phase3/includes/Math.php:r63549,63764,63897-63901,64113,64509,65039,65160,65387,65391,65555,65590,65650,65816,71059,71098,71942,72024,72120,72525

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r65039Replace the new lines in plain math with spaces....platonides21:22, 14 April 2010
r65160Bug 23190#c7 Mark tex text as class="tex".platonides15:31, 17 April 2010

Status & tagging log