Add doc-typehints to class properties found by the PropertyDocumentation
sniff to improve the documentation and to remove the exclusion of the
sniff.
The activated sniff avoids that new code is missing doc-typehints or
real-typehints.
Change-Id: Id7fcfd086cdbb3f040091e1d1a81472e7a524091
Just removing unused code that never did anything. Note this is only
in a test. As long as all tests still succeed this can't really cause
any problems, I believe.
Change-Id: I272803353eed9de0ecf98c55b75710df16da2c44
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: Ifcc9113bc1d2cf79d21871abe7652d7ed8dde20a
In MathML outer table boarders are represented with the
notation attribute of an menclose element. The inner
boarders are represented by the rowlines attribute
of the mtable element. The rowline element accepts
a space seperated list of row boarders. In LaTeX
the bottom line is represented by a new matrix row
that only contains \hline.
This change discover \hline elements in matrix cells
and then determines if it is in the first or last line.
When it is in the last line, the line is removed to avoid
an empty <mtr /> in the output.
Bug: T366417
Change-Id: I196e0d14a183a63696363f9e3006cf65571dc56c
Originally the parse tree was a binary tree, from that
time matrix element were put into that data structure.
This was partially undone, but not full which leads to some artifacts
in matrix cells.
One of the problem is that due to the binary parse
tree structure the postprocessing did not correctly
identfy \limits.
This change changes reduces nesting from matrix, and regards
matrix instances as two-dimensional TexArrays.
Bug: T362344
Change-Id: I66a31a09f204709a51d6b5c9ecefc083f7ee2d6d
TexArray is an array of tex nodes. To improve
readability and type hinting we make TexArray
iterable.
Change-Id: I5b9b2ca63400400bc399c08445ff911f8e20a0d1
When collecting user feedback regarding the native
rendering option on the German Wikipedia (T346795)
it became apparent that some power users aim for bigger
and bolder fonts and a more LaTeX-like layout.
MathML, however, aims to format math as an integral part
of the text with uniform fonts and spacing.
To match both user needs, this patch adds a new rendering
option that uses client-side MathJax (without a need for
restbase or mathoid).
* Adjust MathJax`s loader to be compatible with the mw loader
* Add new rendering mode
* Copy MathJax source to resource module as foreign repo
Bug: T354136
Change-Id: I1ecf9c77fefc3b0f717107d81979276023f6cb84
To reduce the complexity of the parse tree we remove the curly
element which is used for grouping in TeX. Instead, we use
use an attribute which defines if the group is put into curly
brackets or not. The functionality of the curly element
is transferred to the TexArray which was the only possible
child of the curly element before. To ease the transition,
we add a special constructor to TexArray.
We could not measure any performance implications of this change.
Bug: T333973
Change-Id: Idcb58694022831113bdc437576bb9f48658fff2f
The LaTeXML reference variant seems to be generated
with a slightly different version than before
Bug: T354057
Change-Id: I3d51dc06664120a1c7f9a933d7328210b7c6817f
While investigating the dependency between
Math and Wikibase, it turned out there was
a hard dependency in the test code.
This change makes the availability of the Wikibase
Extension optional and conditionally skips tests.
Bug: T362027
Change-Id: I9401d7d4a3277b6923dcd81f411ac5a08f1242d2
Excluded Generic.WhiteSpace.ScopeIndent as
it impact many lines in switch/case syntax
Also disable BraceNotOnOwnLine due to T347440
Change-Id: Ia0c8072da9b7bff6a4010d3fb70cb0e576cdf98a
Expecting E_ERROR and E_USER_ERROR is deprecated and will no longer be
possible in PHPUnit 10.
Bug: T342110
Change-Id: I713460ef62f1dbdf1332916965e833e7f9074e3c
`$this->createMock( User::class )` will return a mock User object
with all fields defaulting to null and this will fail when the
`onGetPreferences()` hook fires in CA since that gets consumed by
`getFormDescriptor()` in PreferencesFactory.
This patch changes the mock user object to a test user object and
this is fine because it's already an integration test.
Bug: T357854
Change-Id: I3d80fc1e59ff00a1a08def41c53d82bc093b6e00
Adding action=purge to the url did not bypass cache
in native mode, because the check request was performed
before the purge information was passed.
* Move purge property to the base class
* Pass purge option via the checker constructor
* Add cache checking for mathoid checker
* Adjust method signatures accordingly
Change-Id: I6f545060ae72dac8b12fb0f85662c4048059b2e9
Following the same argument as for accents,
font options should also be passed in underOver
constructs.
* Pass options
* Add test
* In I6924d712db6852f99d7896b1f11cfbd22851d757
curly learned to encapsulate its output in a
mrow. Thus, the if-clause is no longer needed.
Bug: T352609
Change-Id: I6dd3303d9b5ef9ae32ad33c91a4cc1bbdad46109
Accents such as \widetilde did not pass
their font options to their child element.
* Pass options
* Add test
* In I6924d712db6852f99d7896b1f11cfbd22851d757
curly learned to encapsulate its output in a
mrow. Thus, the if-clause is no longer needed.
Bug: T352609
Change-Id: I81ecda09d017c73a4593ae36c630426229c7559f
instead of testing if an operator starts
with the letter \o we keep an explicit
dictonary of operators which should
be rendered using mover instead of
msub.
Bug: T352699
Change-Id: I916acf2f71d747a31a882fecfccac832436ea991
* Uses BagOfStuff caching instead of custom-made DB cache
* By configuring the BagOfStuff cache in a way that
it writes to the database no performance implications are expected
* For WMF-use this should have no effect since restbase
is used to cache stuff
* Replaces Ib2c216f54e6817ee2c3be0355ba72bd4769ba6ea
Bug: T349442
Change-Id: I1ce8ad9cf4c1a9ae71f447e4e067b39ee2601640
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I8fad94b215664fb77acf8cd8140232271d2c2837
In TeX display math mode \sum_a^b is rendered as
munderover, however \alpha_a^b is redndered as
msubsup.
This changes improves the heuristics to differentiate
between munderover operators such as sum prod and
other macros such as alpha, beta ...
Bug: T352697
Change-Id: I5a993e379791edeb3623171265e5be2651ee1359
When rendering subscripts font arguments such as upright
font were not passed to the child nodes.
This changes passes the parameters.
Bug: T353340
Change-Id: I487bb01afa0d64c809affc4b8a466337d71a1c76
* make intent annotations possible in TeX math items
* introduce a new command to annotate as well as node and translation
* Adds a parser expression grammar to validate intent attributes for
* it basically adds the previous, now abandoned changeset: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Math/+/949964
Bug: T327098
Change-Id: I21adfac4c3580e238f059721fdf0c1566cb4e857
* map to literals to corresponding unicode characters when a double-struck state is recognized
Bug: T352196
Change-Id: I9b9e1d87c10858789751cd14f23d2feea3b928dd
* genFrac renderMML function with bracket can produce false stretching
on Chrome
* fixed for the cases with brackets (dbinom, tbinom, binom)
Bug: T350735
Change-Id: I0939de86963fa9c226346ce15e7edf7fc4e83c68