mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-23 23:25:02 +00:00
Remove special handling of math in sections
Originally this was added in T103269, but according to T103269#6769990 this could not be needed anymore. I've tested this with the original test case, and it all works correctly without running the regex. Change-Id: I5b3b11e71f0d6e55f158fa0d941977c823d12d51
This commit is contained in:
parent
25b3201324
commit
a245040c20
|
@ -157,12 +157,6 @@ class ParserHooksHandler implements
|
|||
}
|
||||
foreach ( $this->mathLazyRenderBatch as $key => [ $renderer, $renderParser ] ) {
|
||||
$value = $this->mathPostTagHook( $renderer, $renderParser );
|
||||
// Workaround for https://phabricator.wikimedia.org/T103269
|
||||
$text = preg_replace(
|
||||
'/(<mw:editsection[^>]*>.*?)' . preg_quote( $key ) . '(.*?)<\/mw:editsection>/',
|
||||
'\1 $' . htmlspecialchars( $renderer->getTex() ) . '\2</mw:editsection>',
|
||||
$text
|
||||
);
|
||||
$count = 0;
|
||||
$text = str_replace( $key, $value, $text, $count );
|
||||
if ( $count ) {
|
||||
|
|
Loading…
Reference in a new issue