Instead of modifying a page rendering hash,
use the proper mechanism of parser option
registration. The cache is still split on parser
option value. The 'math' option is lazy, since
not all pages contain 'math' tag and we want to
avoid an user preference lookup for every parse.
WARNING: this will invalidate ParserCache for
all pages that contain <math> tags, but according
to Moritz, this is about 1% of all pages, so we
should be fine.
Setting up the test is still rather hard and weird
due to very hacky rendering mode to user option
converter, and math renderer interaction with the DB.
This will be cleaned up later.
Depends-On: I92b3e18fabef4eecac2ec2a4844f1be2716e5d89
Change-Id: I3bce04684070ad306685dabbc51267def25773cd
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
Additionally - remove RestbaseInterface::checkBackend.
When HTTP requests are banned from unit tests this method
makes no sence.
MathoidCli tests were not reenabled cause it's a bit hard
to mock shell acceess. Hopefully as part of Shellbox
transition we can have MockShell trait in core and reenable
those tests
Bug: T265628
Depends-On: I350ed59af603a0504704af3265787a4be8f2dc2a
Change-Id: I294d0ed905193850dc38cb3071eb9b31c8863121
This hook is no longer needed by core so it's not
called anymore.
See I5124789fac333a664b73b4b4a1e801ecc0a618ca
Change-Id: I9a554b4e70a2564834e1df4058b1ad5cb98a56e3
* Reenable math validator tests
* Introduce $wgMathUseRestBase which defaults to true
and determines if mathoid is used via RESTbase or directly
* The effect of this change can be tested by setting $wgMathUseRestBase
to false, and then creating a new statement of a property with type math.
One should see a connection to mathoid for every new string and one should
also see the WAN cache for the check endpoint to fill up. Note that
setting WANObject cache to the database simplifies the investigation
of the WAN cache content.
Bug: T274436
Change-Id: I40109e9e09464da78bf855646fb800ee87c1ea67
This additional hook does not seem to be needed.
- wgMathValidModes: All access to this information already uses
getValidModes() and thus there is no need to write this back
to the input variable (use outside the extension is not supported
and it is already not used as cache either).
- wgMathDisableTexFilter: All access already uses getDisableTexFilter()
Move the last bit of logic there instead.
- wgDefaultUserOptions: Duplicate of this already exists in the
onGetPreferences hook higher up.
This seems almost too easy, so I suspect someone tried this before
and intentionally didn't finish it because of some non-obvious
issue.
See T189966 for related perf anaysis.
Change-Id: I4d7fdf6fcae3d44a37bf80d9c72fff2b4361f0c9
The current wikidata entity selector requires WikibaseRepo to be enabled on the client wiki, which is only the case for very small installations.
We implement our custom entity selector that
* displays the item label and
* uses the description as tool-tip.
The implementation was inspired by
mw.widgets.TitleInputWidget.
Bug: T229939
Change-Id: I35d6cc317cf2984d9de6e062f79030f5c31c0811
Expose the math checking service via the REST API.
Port the behaviour of the RESTbase check endpoint to a new endpoint
that uses the MediaWiki API.
* this endpoint does not (yet) provide actual rendering (only checking)
* consequently it does not supply the x-resource-location header
Bug: T252390
Change-Id: I28bcb9a925953062b43cd3481536784431edcd8a
Use WANObjectCache rather than genuine DB tables for greater
flexibility.
Note, this commit is the second step of Ifd89e2d9cb30fa15cc318f077b434207ed6b7214
Bug: T252390
Change-Id: Ifa7d943875f05088ef697a5a18ad292342a9b4ad
Introduce new namespace \MediaWiki\Extension\Math\ and move checking
code to this new namespace.
Note, this commit is the first step of Ifd89e2d9cb30fa15cc318f077b434207ed6b7214
Bug: T252390, T187154
Change-Id: I8c93f4b21d4a72ef2d52d4774d69e4ef55d037ec
The xsede project was terminated. Thus a new sane default is needed.
This value is picked up by extension MathSearch.
Bug: T117659
Change-Id: I7845484a603ef008c9373b76202705c818184dc1
Add a special page and an API endpoint to fetch data from Wikibase
items with a given qID. The special page summarizes information from
Wikibase. The API endpoint allows to request the information
directly. Both, the API endpoint and the special page, fetch the data
from a new helper class for consistency.
Bug: T208758
Bug: T229939
Change-Id: Idd22057a88312bf1a1cb5546d0a6edca5678d80d
The replacement OutputPage::addWikiTextAsInterface() method was added in
MW 1.32; the minimum required MW version has been bumped accordingly.
Bug: T198214
Change-Id: Ie9932b7398d0a9184094a99aec060d78f62dd6f0
Create MathDataUpdater class that checks if statements
are using math and adds the stlyes required for math in that case.
This patch has no effect until
I5bc0622ee7338f3215d14e15331a0a1931ca1ae0
is merged.
After both changes are in effect
I0abd6acbfa12fd503d11476f0c8c8c8a8a851cdc
can be merged.
Bug: T173949
Change-Id: I0e24bbb53e6e01d549f534744780ca1afc49fdd7
In T74240 support for LaTeX based rendering of the <math/>-tags was
removed. This change eliminates the unused code from the repository.
Bug: T195871
Change-Id: Ic57d83fa49f090b574ce8b82fd2ebc84a5350318
* Use the exactly same routines to deliver png images that are used in
mathml mode.
* Change the output to use mathoids png image rather than the mathml
and svg output.
* Locally tested on Firefox and Chrome: Depending on the mode either
the SVG or the PNG path is used.
Bug: T74240
Change-Id: I4b1cac92eb9a02190f316faab6621940951603d5