Commit graph

1277 commits

Author SHA1 Message Date
Bryan Davis f8d8b55c8b Update Pygments to 2.17.2
Bump embedded Pygments version from 2.16.1 to 2.17.2. Changes
<https://github.com/pygments/pygments/compare/2.16.1...2.17.2>.

New lexers: bazel, jsx, kql, kusto, ldappconf, ldaprc, ldif, lean3, prql,
react, starlink, visualprolog, visualprologgrammar, vyper

Bug: T351744
Change-Id: Idcb40a211c051e74bdfb7c4ee642be64e0dde5ac
2023-12-01 15:43:32 -07:00
Translation updater bot b4b0c0c337 Localisation updates from https://translatewiki.net.
Change-Id: I774c58369eaa49898bf1da0a557706be2c6afbb2
2023-11-27 08:33:34 +01:00
Translation updater bot 9e333b5643 Localisation updates from https://translatewiki.net.
Change-Id: I2db9086f83ada1dd6433067d7adbacd440abab40
2023-11-23 11:57:37 +01:00
Translation updater bot 03dcff4ae6 Localisation updates from https://translatewiki.net.
Change-Id: Ib79e88683c007dce19d0849c34645c9ff2fad8e5
2023-11-22 08:20:51 +01:00
jenkins-bot 36988ac086 Merge "Set hasWikitextInput flag to false" 2023-10-03 20:59:13 +00:00
Isabelle Hurbain-Palatin e4e8f8e076 Set hasWikitextInput flag to false
The content of the SyntaxHighlight extension is not wikitext and
annotations should be stripped from it before rendering.

Bug: T341009
Depends-On: I4e9a7a8bec3cb9532ef8a729fd2c6c4acca5d8a0
Change-Id: Ibada54d517830b1112b59513b090dc4bbdc7c917
2023-10-03 20:52:29 +00:00
Subramanya Sastry 9c125346a8 Re-enable Parsoid testing
I think the syntax for parsoid-compatible may have changed at some
point and these tests probably never ran against Parsoid for a while now.

Change-Id: I9d7b23b180995eeadb4e3d183a0e970040ef6c78
2023-10-02 14:48:04 -05:00
Translation updater bot 12faa8fb06 Localisation updates from https://translatewiki.net.
Change-Id: Ie6473f7f7feb1b00aef33849fb10c468e694e006
2023-09-21 10:16:44 +02:00
gerritbot fc431bcd8d Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I7a26d8653e2ed41ab65e8b199c748d1a9e6a80d6
2023-08-19 12:26:03 +00:00
James D. Forrester df82704192 build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I9e5a7dcb0d54c0f763883934939e197b1bc325a9
2023-08-19 14:08:26 +08:00
Translation updater bot 6fcb317ede Localisation updates from https://translatewiki.net.
Change-Id: I37ba72a4e740f1a554caaf685551de6d9570af4e
2023-08-17 12:10:51 +02:00
Bryan Davis 99ce3504ba Update Pygments to 2.16.1
Bump embedded Pygments version from 2.15.0 to 2.16.1. Changes
<https://github.com/pygments/pygments/compare/2.15.0...2.16.1>.

New lexers: asn1, blueprint, bqn, desktop, graphql, openscad, ptx,
systemd, tls, urlencoded, verifpal, yar, yara, zon

Bug: T335460
Change-Id: I9577e2f38c8404698c5079033c3cd9742e8b383f
2023-08-15 04:03:17 +00:00
Umherirrender 7087e991d5 Use HookHandlers for core hooks
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.

Bug: T271029
Change-Id: I6df44cf4a160e618a6546fb9eec36070bf4b868e
2023-08-14 20:23:40 +02:00
Translation updater bot b50b94da93 Localisation updates from https://translatewiki.net.
Change-Id: Icf385284c421993cce13bb294eaa6b7f1abd50e6
2023-08-08 09:01:40 +02:00
Translation updater bot 65d55394f5 Localisation updates from https://translatewiki.net.
Change-Id: I8bb86c594da02016a31fbf32b98b35dd15a58fff
2023-07-24 09:39:51 +02:00
Translation updater bot f4bbbcab54 Localisation updates from https://translatewiki.net.
Change-Id: I893f20b2729bcf4e2a70585ab7fc59b805a24de1
2023-06-26 12:41:05 +02:00
Translation updater bot 25d2109bec Localisation updates from https://translatewiki.net.
Change-Id: I454398796cb8d049218b54e114739fe143b48648
2023-06-09 09:14:57 +02:00
Daimona Eaytoy 52ac696e25 Replace deprecated MWException
Bug: T328220
Change-Id: Iaf4a9bb4aafc741395d5ccc5a42c6a72b5d42b99
2023-06-08 11:14:08 +00:00
jenkins-bot 81f673bc6d Merge "Pygmentize: Treat Shellbox network loss like non-zero exit code" 2023-06-06 23:55:12 +00:00
Ed Sanders 274cc4ab77 Always use the strict equality flag when using in_array
Change-Id: Iedd51f31db2bc4e5257d211719f8bdcf1abb09dd
2023-06-06 13:35:40 +01:00
Timo Tijhof 682fe922f9 Pygmentize: Treat Shellbox network loss like non-zero exit code
Prior to the shellbox migration, if during the parsing of a page,
pygmentize failed (i.e. non-zero exit from its local shell command,
pretty much the only way a php shell exec could fail), then
SyntaxHighlight would fallback to outputting a preformatted plain
`<pre>`.

The logic still exists in the code, and is still triggered for cases
where the command reached shellbox and its result was "successfully"
communicated to MediaWiki (HTTP 200), with the boxed result reporting
the non-zero exit code on the shellbox server.

However, the more likely scenario in the new setup is that the command
times out or never reaches the server in the first place, in which
case we don't get any shell exit code. Instead, we get a Shellbox
exception since the result is unknowable.

Instead of fatalling the entire pageview with a PHP exception and
HTTP 500 from MW, use the same graceful fallback.

Bug: T292663
Change-Id: Icaa8c34ff97ad8a99d044beab529ef943071269c
2023-06-03 14:25:50 +01:00
libraryupgrader ca0ed556a9 build: Updating npm dependencies
* grunt-banana-checker: 0.10.0 → 0.11.0
* stylelint-config-wikimedia: 0.14.0 → 0.15.0

Change-Id: Ifcc811fadf80d1865a55e8f70e0429673ae72b98
2023-06-02 03:55:33 +00:00
Translation updater bot c0ca0d343b Localisation updates from https://translatewiki.net.
Change-Id: I4075423bb207961d43839c811238bd15534e761f
2023-05-23 08:23:06 +02:00
Tim Starling 54b02b02e1 Migrate ResourceLoaderSyntaxHighlightVisualEditorModule to a virtual file callback
Depends-On: I97d61b5793159cea365740e0563f7b733e0f16de
Bug: T47514
Change-Id: I10fceeee808e4d08f7ed63afb13b4d87129365c7
2023-05-08 17:15:48 +10:00
libraryupgrader 13c7d46076 build: Updating eslint-config-wikimedia to 0.25.0
Change-Id: I9d27d063d5f8983127929b117248b489056c8c97
2023-05-05 18:05:47 +00:00
libraryupgrader f0d5eca0ed build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.12.0 → 0.12.1

npm:
* grunt-eslint: 24.0.0 → 24.0.1

Change-Id: I21b929710f0eada0f2ed5c6ae793bbe35f6f93df
2023-04-29 12:09:08 +00:00
Bryan Davis 9f9c13bb7c Update Pygments to 2.15.0
Bump embedded Pygments version from 2.11.2 to 2.15.0. Changes
<https://github.com/pygments/pygments/compare/2.11.2...2.15.0>.

Pygments 2.15.0 includes support for MediaWiki's wikitext for the first time
ever (T29828).

New lexers: art, arturo, be, berry, carbon, comal, comal80, cplint,
css+ul4, dax, fc, fif, fift, func, gap-console, gap-repl, hcl, html+ul4,
jmespath, jp, js+ul4, jsonnet, k, linuxconfig, lobas, macaulay2, mcf,
mcfunction, mcschema, mediawiki, mips, oobas, phix, portugol,
postgres-explain, py+ul4, q, qlik, qlikscript, qliksense, qlikview,
snbt, sobas, sql+jinja, tal, tlb, ul4, unixconfig, uxntal, wsgl,
wikitext, wowtoc, wren, x++, xml+ul4, xpp

Bug: T334433
Change-Id: I80576c0782b8b6d4b5bfd0596f72d81c4f9346a8
2023-04-10 21:33:05 +00:00
Meno25 85f0eea957 Minor update for README
* Use https instead of http

Change-Id: I56bdd89e0d3dfb11c5e51b62b7999c9c82474da3
2023-04-10 11:41:21 +00:00
Umherirrender 00595fd798 stylelint: Enable selector-pseudo-element-colon-notation
Via stylelint --fix

Change-Id: I544aaa852df15c2b3088c65115f812e75c93f994
2023-03-30 01:00:39 +02:00
Translation updater bot de3ac99e0d Localisation updates from https://translatewiki.net.
Change-Id: I49f94652526f995f82c0cd6a7429b04ad05ec94d
2023-03-22 09:16:33 +01:00
libraryupgrader 6a0c7826b0 build: Updating npm dependencies
* eslint-config-wikimedia: 0.22.1 → 0.24.0
* grunt: 1.5.3 → 1.6.1
* stylelint-config-wikimedia: 0.13.1 → 0.14.0
  The following rules are failing and were disabled:
  * selector-pseudo-element-colon-notation

Change-Id: Ia16224c8a403ef78a6cce4d6b7d06775c2dc908d
2023-03-16 07:49:25 +00:00
Translation updater bot 443e6bcf68 Localisation updates from https://translatewiki.net.
Change-Id: I6ae3ab1d323a889702d0d3363eb6a76c8b990730
2023-03-15 08:50:39 +01:00
libraryupgrader f02a3a2821 build: Updating mediawiki/mediawiki-codesniffer to 41.0.0
Change-Id: If734e97b623b72d9dc63f6b1e054467c91ca82f2
2023-03-12 11:40:26 +00:00
Ed Sanders e39f530bfb Document the linelinks attribute and load JS when used
Change-Id: Iaf6e2ef58e85ac92e5fcf9dd3449baae927feb9c
2023-03-09 12:48:55 +00:00
Translation updater bot 510e00d19b Localisation updates from https://translatewiki.net.
Change-Id: I0739dc40be8dbfbdd33c6858e8698ccbc6f264f4
2023-02-27 08:28:20 +01:00
C. Scott Ananian 2f4f3c962f parserTests.txt: Add nohtml option to accomodate test runner change
This makes the parserTests compatible with change
I61a67a0e6928463e3872be9a42ff6992c6754662 in core.

Change-Id: I5c22f456a3ae5ea25b59c4246d68965099c465cc
2023-02-09 23:36:00 -05:00
Translation updater bot 02c514fd14 Localisation updates from https://translatewiki.net.
Change-Id: I78c21ef61a3fde83ed2d26c49566a54eea8ee24c
2023-01-03 08:21:36 +01:00
Translation updater bot 91f7fc1b9b Localisation updates from https://translatewiki.net.
Change-Id: I479501f404c825d80ba8a7f74c723e43cd73bc10
2022-12-23 09:08:21 +01:00
Translation updater bot 881fc7d083 Localisation updates from https://translatewiki.net.
Change-Id: I50094fa10bbc38f7440b092c7934223bd0e95c0f
2022-12-21 09:18:07 +01:00
jenkins-bot 14cb8415da Merge "fetchLexers: Pass '--json' to Pygmentize" 2022-12-21 01:00:30 +00:00
Ori Livneh 508e926b5d fetchLexers: Pass '--json' to Pygmentize
Use the '--json' flag to get Pygments to output its list of supported
lexers in a machine-readable format. Support for this flag was added (at
our request) to Pygments and included in the 2.11 release[1].

Tested by running updateLexerList.php and confirming empty diff.

  [1]: https://github.com/pygments/pygments/issues/1437

Change-Id: I0f1d7fceca9034e6034bafa6a8dd312b99d379d1
2022-12-20 23:18:55 +00:00
jenkins-bot 4fead6c331 Merge "Fix lexer list parsing on Windows" 2022-12-20 22:40:50 +00:00
libraryupgrader f90b6bd647 build: Updating qs to 6.11.0
* https://github.com/advisories/GHSA-hrpp-h998-j3pp

Change-Id: I2b126cc32af89269b2ac5da8de13448f29db5cb1
2022-12-07 03:45:02 +00:00
jenkins-bot 362ca84426 Merge "Make the code size limit for highlighting configurable" 2022-11-26 12:54:41 +00:00
Translation updater bot 891e291741 Localisation updates from https://translatewiki.net.
Change-Id: I324ccdcd5b9ffb17b75f0c46e98e6a09c738d13c
2022-11-24 08:18:18 +01:00
Ryan Schmidt 2ae82c7fb7 Fix lexer list parsing on Windows
When using a non-bundled Pygments (which is required on Windows, as the
bundled version is an ELF binary), we call into the Pygments executable
to generate the list of supported languages (lexers). This list seems to
occasionally include carraige returns, causing some languages to not be
processed correctly. Trim those CRs out so the language list is
accurate.

Change-Id: If8b1f145dd10e2c4707d6d32927e85d1d2459f15
2022-11-20 22:46:55 -07:00
libraryupgrader 27ca45e8cb build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 39.0.0 → 40.0.1

npm:
* stylelint-config-wikimedia: 0.13.0 → 0.13.1

Change-Id: Ifd15d37271ad474c948e9187b7b6bccc1f336489
2022-11-16 23:22:01 +00:00
libraryupgrader b4e5ef0a41 build: Updating grunt-stylelint to 0.18.0
Change-Id: I4c52e2c0121f617c04e32a04b3e7bec785606e8f
2022-11-13 09:48:07 +00:00
jenkins-bot 1351b2e427 Merge "Count only real highlighting as expensive parser tag hooks" 2022-11-11 09:18:52 +00:00
Translation updater bot 9ccc4102d2 Localisation updates from https://translatewiki.net.
Change-Id: I5202cfa8a0d62cfd7abab552f59afaeda1134118
2022-11-08 08:21:36 +01:00