Replace Content::getNativeData() calls with TextContent::getText() in Math extension.
Bug: T283679
Change-Id: Iaf3b7f82f14069374de8ede7b519d822f8d6010f
This is doing a bulk of the job of creating a service
for working with math modes configuration. There's
still things to do, like moving math mode names,
and perhaps depending on default user options to
provide a bit more convenience, but that will be the
next step.
Change-Id: I1259a93651920f44104f2f5135e3e620c858be8d
Actual changes:
* Let the special page accept the subpage parameter, e.g.
[[Special:MathWikibase/Q6203]].
* Fix some of the message escaping issues in SpecialMathWikibase.
Messages that are just plain text and not supposed to contain any
parameters, wikitext, HTML, or something like this should be
properly escaped, either via Html::rawElement( $msg->escaped() ) or
better Html::element( $msg->plain ). The later approach is cheaper.
Other code cleanups that don't affect production:
* Reduce the amount of duplicate code in SpecialMathWikibase.
* Make use of the preg_match() return value.
* Remove default parameters from parent::__construct() call.
* Remove some auto-generated comments.
* Remove some comments that don't add new information, but just repeat
what the code already says.
* Make use of PHPUnit's assertCount().
We can split this patch into smaller patches, if you prefer. This
should especially be done if one of the changes is controversial, to
not block the other changes. Please tell me.
Change-Id: I8c20014435af3d2ac9c7381fe5fd00b9fe49b2c2
Renders formulae via mathoid without to run mathoid as a service.
Mathoid 0.7.1 or later must be installed locally and configured to be
accessed directly from the math extension. It has been tested with the
config.dev.yaml of version 0.7.1. If mathoid is installed in
'/srv/mathoid' the following line might be added to LocalSettings.php
$wgMathoidCli = ['/srv/mathoid/cli.js', '-c', '/srv/mathoid/config.dev.yaml'];
i.e., make sure to specify the -c parameter with an absolute path.
In addition mathoid uses more memory than the the default. With
the config.dev.yaml a value of
$wgMaxShellMemory = 2097152;
has been tested to work well.
Change-Id: I0600f056d21927963267cf979d342e313419e9fa