Including an user options to enable/disable the scheme. Defaults
to false. Feature is only availible together with the new more
accessibile color scheme as the CSS depends on each other.
Set behind a new temporary feature flag.
Bug: T305027
Change-Id: I46d240a30eda5a1526ada1fe9b724f7b4594b426
Replace User::getOption() with UserOptionsLookup::getOption() since this method will be hard-deprecated.
Bug: T296083
Change-Id: I405251092fd94fa70a33319d313c5140c8cebc21
This preferably would be set to on by default so that the extension
works out of the box, but it causes tests to fail in Core (T286623).
Despite the previous state of CodeMirrorHooks::onGetPreferences(),
CodeMirror was never on by default anyway.
Bug: T286270
Change-Id: Ic702b868b55aaa8ab71ddedd289c25f36b34b112
Introduces a new config variable `CodeMirrorLineNumberingNamespaces`
that can restrict line numbering to only appear for specified
namespaces. Setting to null enables everywhere.
This takes some liberties with the `lib` module, turning it into a
container for shared functionality. This can be pursued in later
work, by cleaning up duplicated code in this repo.
FIXME: failed to deduplicate the code for now.
Bug: T267911
Change-Id: Ida2b33eef38edc57d29756ec472c6f2c83bd7b11
These changes to the color scheme are hidden behind a feature
flag for the time being.
Bug: T271895
Change-Id: I0a4b03e0f3bc8239f31edbbd5ae55661607b76f6
This is a convenient way to propagate alternate configuration during
browser testing.
Bug: T270240
Change-Id: Ica6399c53499be7f930e8d13b838ad265b66cdf4
* using CodeMirror addon matchBrackets
* highlights the matching bracket of a pair
* highlights brackets when cursor is inside a pair
* feature usable in source code editor
Bug: T261857
Change-Id: Ib01d9919a47bb29684b54501644b01936b57972a
* Per https://www.mediawiki.org/wiki/Manual:Hooks/GetPreferences, it is
strict on $preferences being an array, so type hinted it to conform.
* Remove legacy hook behavior for onResourceLoaderTestModules() hook in
CodeMirrorHooks. See: https://w.wiki/3Az for more information. Also,
added `@see` with link to the documentation of the hook used.
Change-Id: I0a2fac4b4d491abf8d2f661be32bf2e0d791c90b
Documentation here: [[mw:Manual:Hooks/BeforePageDisplay]] also
says so about objects passed by defaults as references, no need
for the &.
Also, fixed onResourceLoaderTestModules() function header for the
$rl parameter, removed the & symbol and updated this hook's docs
here: [[mw:Manual:Hooks/ResourceLoaderTestModules]].
Change-Id: Ifdabc47a1a4f02aec4906edb800d360ca4febd76
This was used for backward compatibility after beta support was removed
by MaxSem in I1ad451acfd163c783e7b (T185030). As a todo, this backcompat
was planned to be removed in 2019 :).
Bug: T219342
Change-Id: I35c77add8b4815a26b1bea2df90eaeae05a9a9f7
And there's no need to manually call firstCallInit() anymore, the
Parser will call it in all the necessary places automatically.
Depends-On: Ida62767f3ca53f99609cae01d3a20051bb92ccab
Depends-On: Ia2d98baf6caed2cd779cb00aceba5785cf13d633
Change-Id: I7e2097fa733506985a4b252fc9b01b03f6c28885