mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-18 02:20:46 +00:00
c4d9349786
* (bug 14202) $wgUseTeX has been superseded by the Math extension. To re-enable math conversion after upgrading, obtain the Math extension from SVN or from http://www.mediawiki.org/wiki/Extension:Math and add to LocalSettings.php: require_once "$IP/extensions/Math/Math.php"; This is an initial stab, and a few things remain to be cleaned up: * messages need to be moved from core to extension * MW_MATH_* constants should be moved to the extension from core * old back-compat math names interfaces using those constants should be removed from message files * classic edit toolbar's math button should be added from the extension (or else dropped) -- currently there's not a clean hook, but could do it by JS * couple of things like the 'armourMath' function on Language & LanguageConverter may want to be redone just as an unconditional, if that's simpler. Setting $wgUseTeX alone will no longer have any affect. The var's still there for the moment as a few bits still need to be fully moved out from core.
42 lines
1.7 KiB
Plaintext
42 lines
1.7 KiB
Plaintext
|
|
!! test
|
|
pre-save transform: comment containing math
|
|
!! options
|
|
pst
|
|
!! input
|
|
<!-- <math>data</math> -->
|
|
!!result
|
|
<!-- <math>data</math> -->
|
|
!!end
|
|
|
|
#!! test
|
|
#BUG 1887: A <math> with a thumbnail- we don't render math in the parsertests by default,
|
|
#so math is not stripped and turns up as escaped <math> tags.
|
|
#!! input
|
|
#[[Image:foobar.jpg|thumb|<math>2+2</math>]]
|
|
#!! result
|
|
#<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><math>2+2</math></div></div></div>
|
|
#
|
|
#!! end
|
|
|
|
!! test
|
|
BUG 1887, part 2: A <math> with a thumbnail- math enabled
|
|
!! options
|
|
math
|
|
!! input
|
|
[[Image:foobar.jpg|thumb|<math>2+2</math>]]
|
|
!! result
|
|
<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><span class="texhtml" dir="ltr">2 + 2</span></div></div></div>
|
|
|
|
!! end
|
|
|
|
#!! test
|
|
#Math section safety when disabled
|
|
#!! input
|
|
#<math><script>alert(document.cookies);</script></math>
|
|
#!! result
|
|
#<p><math><script>alert(document.cookies);</script></math>
|
|
#</p>
|
|
#!! end
|
|
|