Update the CSS generation script to generate styles for both light and
dark modes. The Pygments style 'default' is used for light mode, as
before, and 'monokai' for dark mode.
Bug: T365926
Change-Id: I0cc1f9a10d4ff8e0c279a12cacbb1c300225328f
Verify that running Pygmentize::fetchGeneratedCss() (which gets invoked
from the updateCss.php maintenance script) gives CSS that matches the
generated file pygments.generated.css.
Change-Id: I454f287cb461b596178ee47c44634e2e127fe576
Prepend '//' to relative URLs to turn them to real new (root)
addresses instead of relative paths in current domain
Bug: T368166
Follow-up: I999937c1f6303ecc64adb6285e73a9ce10f67bd8
Change-Id: I2cf901c7b0454517dc93ea8113dcf69832584c08
In Scribunto modules, link page names used in require(), mw.loadData()
and mw.loadJsonData() invocations.
Inspired from the CodeLinks gadget[0] but rewritten for brevity,
avoiding Wiktionary specific code, making the code more generic,
and thereby adding support for mw.loadJsonData().
[0]: https://en.wiktionary.org/wiki/MediaWiki:Gadget-CodeLinks.js
Bug: T368166
Change-Id: Idc554269ee52a05660fa41f065a2b3c73e2e1b9b
* Use mw.Title so that template links work for templates outside
template namespace, and so that titles are normalized.
* Use recursion instead of while loop so that both the segments before
and after the inserted link are searched for further linking
possibilities. Among other cases, this fixes the case where a template
link before a wikilink (on the same line) was not working. This also
avoids infinite iteration if mw.Title.newFromText() failed to create a
valid Title object.
Bug: T368166
Bug: T374693
Change-Id: I4d485340928b81df26ca035874422fdb5930710f
<syntaxhighlight> blocks with a boolean "copy" param will now have a
button next to them for copying the code to the clipboard. Not
applicable for inline code blocks.
Adapted from the mediawiki.org gadget written by Krinkle.
Bug: T40932
Change-Id: Ic8ef030514c3b6dd2cb9b137f032588869ab3762
Changes for T356956 applied the styles in the wrong place.
`<div class="mw-highlight">` should have no background (and we need
to override the default Pygments styles that add it).
`<div class="mw-highlight"><pre>` and `<code class="mw-highlight">`
should have background (and we need to override core MediaWiki styles
that adapt to light/dark mode with forced light mode colors).
Bug: T365927
Change-Id: I473203b12673f7bc004f953ab33fe36fb897e095
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected
Change-Id: I90829d944447688b0e8ed20a89b5bdfddaea392b
This patch migrates the `syntaxhighlight_shell` metric to the new Prometheus
format while copying the equivalent graphite counterpart to Graphite for
backwards compatibility with the existing Grafana dashboards.
Bug: T359270
Change-Id: I95bc2e749324092aae5db9135847c28aa16c64ea
It's common practise to use [[wikilink]] syntax to mention page names
in comments of JS/CSS/Scribunto code where the links ordinarily don't
work. Using JavaScript to actually make the syntax clickable makes
navigation easier.
{{Templates links}} and external links are also supported.
Bug: T368166
Change-Id: I999937c1f6303ecc64adb6285e73a9ce10f67bd8