<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
Most python error messages are reported to stderr rather than stdout. In
the event of a catastrophic failure executing the Pygments binary we are
likely to need to report stderr so that folks can debug the problem with
the executable.
Bug: T364249
Change-Id: Id5e5dbc515fdcdeb6eec61aacbbb9cbeddc79fab
This overrides the default skin rule for pre elements as seen
on [[mw:MediaWiki-Docker%2FExtension%2FWikiLambda]]
Bug: T356956
Change-Id: I0a28323f4269e7afb89dce78927e048734f15a49
The ruleset wikimedia/client-es6 already contains
the ruleset wikimedia/jsdoc. So wikimedia/jsdoc
doesn't need to be declared.
Bug: T365047
Change-Id: I59c8f9a244ff727273783b4a3104929232801819
The existing color of background if set to inherit will not work
in night mode. There does seem to be a background set in pygments.generated
so this probably doesn't need to be defined at all, but I erred on the side
of caution.
When defining a background that is not using a Codex design token
we also want to define a color to avoid the status quo of unreadable
text.
Note: this is a short term fix for making the content readable.
We can theme this in night mode later after further analysis.
Bug: T356956
Change-Id: Ic58482b73e520505bde26a47e74f131dd8a51671