r65039 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65038‎ | r65039 | r65040 >
Date:21:22, 14 April 2010
Author:platonides
Status:ok
Tags:
Comment:
Replace the new lines in plain math with spaces.
This avoids interactions with the parser taking those new lines into account for the wikitext.
Fixes bug 22818 and bug 23190.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Math.php (modified) (history)

Diff [purge]

Index: trunk/phase3/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 ('$ ' . str_replace( "\n", " ", htmlspecialchars( $this->tex ) ) . ' $');
4243 }
4344 if( $this->tex == '' ) {
4445 return; # bug 8372
Index: trunk/phase3/RELEASE-NOTES
@@ -109,6 +109,7 @@
110110 * (bug 19858) Removed obsolete <big> in interface messages.
111111 * (bug 21456) "Bad title" error when showing non-local interwiki pages no longer
112112 displays incorrect tabs
 113+* (bug 23190) Improved math representation for text browsers.
113114
114115 === API changes in 1.17 ===
115116 * (bug 22738) Allow filtering by action type on query=logevent

Follow-up revisions

RevisionCommit summaryAuthorDate
r75909MFT r65039, r65160: fix "Leave it as TeX" math rendering mode, which was caus...tstarling05:33, 3 November 2010

Status & tagging log