A formatter like this is not supposed to check if the format is known
or not. The code calling these formatters can introduce new (sub) formats
any time. What a formatter like this should do then are two things:
* If it's some HTML format, always return HTML.
* If you really can't identify the format, do a sensible fallback.
This currently blocks introducing a new format in Wikibase.
Bug: T46727
Change-Id: I585069e8f2ba33ec657ca4d514c6d502fe0f5ba3
This is obviously copy-pasted from somwhere else. Note that this tag
only appears in these two files. No other file does have it. It's not
useful for anything this way.
Change-Id: I7e0dcf0594fb59b396b1fd26b13383d59227b3f9
Documenting protected members as protected members is not really helpful.
One can see this by looking at the code.
Same for documenting a variable named "$html…" as "HTML". This does not
add anything.
Change-Id: I72364b6857166d77b9c85aa884cd139dc163c6bb
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.LicenseComment.InvalidLicenseTag
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
Change-Id: Ia8000677263c4150d4900526bcba1c0602664b8e
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
Phpunit now checks if the coverage annotations are reasonable.
This fix corrects unresolvable references in phpunit covers annotations.
Change-Id: I7eba10bd7dc445b175df750465bb80bd5ef0f4c6
The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.ClassMatchesFilename.WrongCase
* MediaWiki.Files.OneClassPerFile.MultipleFound
Change-Id: Ia2c06ebe33acefdf03625d86d98bf0dbaf826c4c
Display error message in the UI,
if the check command passes,
but the mml/svg/complete endpoints returns an valid json error.
Bug: T143225
Change-Id: I50776926e42f75a2c1e30fc9afe08baae3fcdbd1
The test is broken on beta cluster because the formula is rendered as
meta tag. It is rendered at img tag on my mediawiki-vagrant virtual
machine. The test now works on both environments.
Bug: T128190
Change-Id: I458d618af24533d104fcac25a8d8c6468b14605a
selenium* jobs are a new way of running Ruby based Selenium tests. The
jobs are triggered daily.
Bug: T128190
Change-Id: Ide349ea15e0c38ff9f61d348abd61cd2349a83f6
It was reported that under certain circumstances a semicolon was
missing from the SVG style.
Bug: T132563
Change-Id: I148433657848fdc74889fcaf6d883078c46a4006
Diffs should show the rendered output as well as the TeX source,
so changes that do not affect the output noticably can still be
assessed by looking at the diff.
Bug: T125712
Change-Id: I098d30ea3158ec34723bfca313cf2bcc4cbc591f
When user is logged in, visual editor is the default editor. When user
is not logged in, source editor is the default editor. When the test
does not log in, everything works just fine.
Bug: T126463
Change-Id: I1f15000a275657c0a92172781f57c5d1db537dcc
The problems was that visual editor is the default editor at
en.wikipedia.beta.wmflabs.org, and the test was expecting source editor.
The test now works also locally, using mediawiki-vagrant.
Removed headers from some files. We no longer use those headers.
Removed cucumber tags we no longer use, mostly internet explorer.
Added missing dependency (rake) to gemfile.
Bug: T126463
Change-Id: Ia5809f40719a2fe0c6c94338072a38765fa5c87b
* Add support for LaTeX package mhchem.
* Add hook <ce>
* Add format <math chem>
See bug description for the details.
Bug: T98306
Change-Id: I2ab80834edc5d071618bc52f133cfb2b7ece5016
This fixes some warnings in my PHPStorm, gets rid
of duplicate code, inlines constants that do not
make the code easier to read, and more.
Change-Id: I02f446491509043f5d3e51e26e932f76c9ecb6cf
This change implements all components to use the datatype 'Math' in Wikidata.
Because 'String 'is used as value type, only the Formatter and Validator are needed to be implemended.
The components are:
* hooks
* Formatter class
* Validator class
* Test cases
Bug: T67397
Change-Id: Ic64fd6c8560f48052e2db24ae1f013d48a82b5e9
The simple math test failed to find the edit link on a non existent
page. It was looking for the text 'Create source' from Vector which is
now simply 'Create'.
Change the PageObject selector to use a CSS selector, more robust to
text changes.
Change-Id: Ifcbd07da8e343b5697fcff6af6ffac90ff4d6420
* This will increase the performance of tex rendering for all
rendering modes since no shell access is required anymore.
Merge with caution. If the connection to restbase fails, rendering
of new formulae will be completely disabled i.e. broken.
Change-Id: I1982612e8c6a356e3dbdf447724ac82e5968cc77
This change only connects the restbase and the mathinput interfaces
but does not change any functionality.
Change-Id: I3a23e5008c26c5f14ad842dcb5d22906a8aff33c
Tex validation should be skipped if checking is disabled.
Consequently if 'disable tex filter' is set to 'never' it's a double
negation and tex should always be checked.
If 'disable tex filter' is set to always, never check tex.
Change-Id: Ic6fda8016838eae03a0ed36e3d8d4f35423ba8b1
* Use string constants instead of integers
* Derive new names from old via conversion of constant
naming convention to CamelCase.
* Replace old constant string e.g. 'MW_MATH_ABC_DEF'
with new string 'abcDef'
* Replace old constant value with new string.
* Tests to demonstrates what is actually done.
* Rename constants
Bug: T106630
Bug: T106631
Bug: T87941
Change-Id: I6d1094ece79e912d9ddbef6681a25196c7a6e801