Commit graph

5172 commits

Author SHA1 Message Date
C. Scott Ananian d730d17c1a parser tests: move test which requires {{#ifeq}} into its own file
Since parser test requirements are per-file, move the smoke test which
requires `{{#ifeq}}` (from [[mw:Extension:ParserFunctions]]) into its
own file and define the requirement properly in the file header.

That avoids spurious parser test failures if developers don't have
the ParserFunctions extension installed locally.

Change-Id: Ia5ffbe0896d5033fe2da526e42bf111edbc56adf
2022-05-27 11:38:02 -04:00
libraryupgrader 3ab0da7b75 build: Updating grunt to 1.5.3
Change-Id: I3cee4a7b763dd7e5979af66bcd6b01680b5894c0
2022-05-26 08:44:00 +00:00
Translation updater bot 6b0dfa2cc5 Localisation updates from https://translatewiki.net.
Change-Id: I44427d3f19ae4a316c72e6affa7dc70e8f1981f7
2022-05-26 08:51:04 +02:00
Translation updater bot 230fd23fd3 Localisation updates from https://translatewiki.net.
Change-Id: Ifdf601d4a5c8c5f9e11891b37226fcfac25af978
2022-05-25 08:31:40 +02:00
jenkins-bot 20ec7ced59 Merge "Use new ResourceLoader namespace" 2022-05-24 23:22:32 +00:00
Tim Starling bb72bc65f5 Use new ResourceLoader namespace
Extensions using Phan need to be updated simultaneously with core due
to T308443.

Bug: T308718
Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
Change-Id: Iebc5768a3125ce2b173e9b55fc3ea20616553824
2022-05-24 23:00:08 +00:00
Translation updater bot 6760950e0d Localisation updates from https://translatewiki.net.
Change-Id: I0a3e0e3afd66855a3d9eef787968ecfb48692096
2022-05-23 08:16:24 +02:00
libraryupgrader a1a25ba16f build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 38.0.0 → 39.0.0
* php-parallel-lint/php-console-highlighter: 0.5.0 → 1.0.0
* php-parallel-lint/php-parallel-lint: 1.3.1 → 1.3.2

npm:
* grunt: 1.4.1 → 1.5.2
* stylelint-config-wikimedia: 0.12.2 → 0.13.0
* wdio-mediawiki: 1.1.1 → 1.2.0
* async: 3.2.2 → 3.2.3
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25
* ejs: 3.1.6 → 3.1.8
  * https://github.com/advisories/GHSA-phwq-j96m-2c2q
* jake: 10.8.2 → 10.8.5
  * https://github.com/advisories/GHSA-fwr7-v2mv-hh25
* minimist: 1.2.5 → 1.2.6
  * https://github.com/advisories/GHSA-xvch-5gv4-984h

Change-Id: I7f0ba2e2f56f49f24b265b679d34df5e810f9b2e
2022-05-21 01:03:13 +00:00
Translation updater bot 4152001d11 Localisation updates from https://translatewiki.net.
Change-Id: If8486e1fde1c8af9d59475d2c2c679feb4f24a57
2022-05-20 08:36:07 +02:00
Translation updater bot 0a0ee0219a Localisation updates from https://translatewiki.net.
Change-Id: I046892e1d1ba92a7cf7ce75eca6b6d48dc478cc4
2022-05-19 08:18:55 +02:00
Translation updater bot bbd960b1e6 Localisation updates from https://translatewiki.net.
Change-Id: Ie79e15c9697275ffce882e14657e393f9df47e63
2022-05-18 08:19:20 +02:00
Subramanya Sastry 5515de2003 Sync up with Parsoid citeParserTests.txt
This now aligns with Parsoid commit e4305217923162568cf5b6ec08ba3c96fd5b04e3

Change-Id: I935d8641d90ec5cbcf7d29fd984085cc5338b6ec
2022-05-17 18:00:18 -05:00
Translation updater bot 15dd4d9b00 Localisation updates from https://translatewiki.net.
Change-Id: Ieab667d0073e2aee21ccca87ee1fff66b3c02d42
2022-05-17 08:27:38 +02:00
Translation updater bot 95ef061e76 Localisation updates from https://translatewiki.net.
Change-Id: Ie68cd0662d8dbdc630882003c9234f0dbbf454d1
2022-05-16 08:23:58 +02:00
C. Scott Ananian af2352e523 parser tests: Make !! config values JSON-compatible
Bug: T307720
Change-Id: Ib716c70bc47659701edfc572674b3e890e19605b
2022-05-11 21:05:55 -04:00
Subramanya Sastry 45cc963ca2 Sync up with Parsoid citeParserTests.txt
This now aligns with Parsoid commit 12d896bd5852b4a7d602fb22dd09d7fc2c5c5b64

Change-Id: I1d3183ee4afa37e0d71768cd02f03112771b82c4
2022-05-11 18:08:24 -05:00
Subramanya Sastry 74aa1ea647 Cite tests: Update html/parsoid sections with output in integrated mode
These changes are a result of adding Parsoid integrated testing support
in core.

* Some tests got new html/parsoid sections.
* Some tests got their html/parsoid output upgraded to remove bogus HTML.
* Since we are not treating the test runs to be in integrated mode,
  I removed some comments that only pertained to a test run in
  standalone mode.
* There are 8 tests that are failing in integrated mode as well and
  I've tagged 5 known ones with T307741. The other 3 failing ones are
  the responsive reference tests that have a threshold value set.
  Those failures will need investigation and require additional changes
  to the core parser test runner to pass through the config to Parsoid.

Change-Id: I370d57d45cf126f71b3666fb493a887faf6b8e0d
2022-05-11 17:40:46 +00:00
Isabelle Hurbain-Palatin 28d6a05c35 Hoisting references outside of links
When a reference is inserted in a link, Parsoid generates nested links,
which would break browser rendering. In some cases where the generated
HTML is reprocessed in later stages of Parsoid (as is the case in
T301293), it can lead to internal breakages.

In this patch, we propose to hoist references markers (and their <sup>
tag) included in links outside of that link, as next sibling to the link.
It avoids the vast majority of link nesting due to that situation, with
the following side effects:
* the <sup> tagging is now maintained around the marker tag,
* if a ref tag is in the middle of a link, it gets moved to the end of
the link (in the legacy parser, it stays where it is, but the end of the
link gets de-linked).

The selser test failures are consistent with the expected behaviour - wt2wt
does not round-trip correctly, leading to selser failures.

Bug: T301293
Change-Id: Ia39483c2112b1356e14a310fbb48baed946b5caa
2022-05-11 13:45:59 +00:00
Translation updater bot 829d11c4a4 Localisation updates from https://translatewiki.net.
Change-Id: Iad7c530624319007e92528f681f6f7565e5d5944
2022-05-11 08:11:14 +02:00
Arlo Breault 6d9afe15dd Resolve linter test port-fixme
Implements mocking for the #tag parser function for ref tags.

The ref-in-ref linting cycles tests from 04aa4be can now be restored.

This shows that after I1b598bd359b900d1b89abf5d8105a5d131aea3d1, the
protection added in 04aa4be is no longer necessary, because we only lint
the content where it's defined.

Bug: T237463
Change-Id: I4059e32b9bea8cdc23d2112812c3f7e167e47399
2022-05-10 17:07:08 -04:00
Arlo Breault 18889348c9 Lint html stashed in data-mw of mw:Extension/references
Follow up to I1b598bd359b900d1b89abf5d8105a5d131aea3d1

This also lints the html stashed in data-mw of mw:Extension/ref, when
named references have redefinitions.

The fast fail for linting references with errors is removed since it's
no longer necessary after the work in T51538.

Bug: T214994
Change-Id: I2431b4782339a1ac41c49f7ca0ad3480c0b13bad
2022-05-02 23:37:42 +00:00
Arlo Breault 9fa2aeaba3 Only lint content defined by a specific ref
This change will fix the crasher from T301293, since all the necessary
information to locate the ref contents is contained in the first
encapsulation wrapper node, we therefore don't need to traverse into it
and potentially be tripped up by the node being closed early for having
content model violations.

By using the linkback id from the href, we're potentially linting the
content multiple times.

By using the id from the data-mw, we're only linting the content
specified by the specific ref (with the slight caveat that if two named
refs define exactly the same content, they share an id).

Note that if named refs have multiple definitions, and hence the content
ends up in data-mw, we aren't yet linting it, that's T214994.

However, by not using the linkback ids from the href, we'll need to
traverse the html that mw:Extension/References have stuffed in their
data-mw if we want to lint references defined in the references tags
themselves (see the commented out test).  This has the benefit though of
not running into the issue described in the References::lintHandler
(ie. not having the right tplInfo while traversing the content).

Bug: T301293
Bug: T214994
Change-Id: I1b598bd359b900d1b89abf5d8105a5d131aea3d1
2022-05-02 23:37:39 +00:00
Translation updater bot a7839489e7 Localisation updates from https://translatewiki.net.
Change-Id: Iee4dce698743838ba4aaabb58fc90722eb2cc2a5
2022-04-29 08:42:31 +02:00
Arlo Breault e3c4e96c71 Prioritize body->html over body->id when diffing refs
Just to keep things consistent since that's the precedence we use when
serializing.

Change-Id: I1456b6a21ae050d58d15620e501a14c29a64f9e3
2022-04-28 14:51:05 -04:00
jenkins-bot df8d92ff01 Merge "Avoid indirect global access in unit tests" 2022-04-28 16:45:25 +00:00
Translation updater bot 39b6dc0fa2 Localisation updates from https://translatewiki.net.
Change-Id: I7c8b3ac3a4d9cf746e1254aaf7f9e5516a1c8f14
2022-04-28 09:28:16 +02:00
Aryeh Gregor 7bd68f0efa Avoid indirect global access in unit tests
If a ResourceLoaderFileModule is constructed with no arguments, it
accesses global variables, so this is not allowed from a unit test.
(This is probably a bug in ResourceLoaderFileModule, but one thing at a
time.)

This blocks If005958c76bbfabba74def4215c48fe94f297797.

Change-Id: I84056024b0d3a9dcddb1ab4dc8596118bb3fe8ea
2022-04-27 18:10:29 +03:00
Translation updater bot 5b4cd3623b Localisation updates from https://translatewiki.net.
Change-Id: Ia89734da5a9eee0a871ccc59a4230343c6bf27a7
2022-04-27 08:07:56 +02:00
Translation updater bot 705819c714 Localisation updates from https://translatewiki.net.
Change-Id: I1c01d1195e9f9f1af8615957ea4cc19101041268
2022-04-25 08:17:24 +02:00
Subramanya Sastry a478d6c3a3 Sync up with Parsoid citeParserTests.txt
This now aligns with Parsoid commit c434df9.

Change-Id: Ib8b8593d1a303530dac56ed01335e0d635863eda
2022-04-20 19:03:18 -04:00
Subramanya Sastry c3f34b7360 Cite: Document the Parsoid-only responsive refs threshold
* This functionality comes from 74acc71e

Change-Id: I5d985ff75670136a27d52850ea0e41da52fa3c96
2022-04-14 12:32:18 +05:30
Subramanya Sastry 169ebf6344 Sync up with Parsoid citeParserTests.txt
This now aligns with Parsoid commit 3b5a7a318eaf8dcc5e6ed142352f1cf1a9439474

Change-Id: I32f9fcac231cdf25bd1501d7f6e022e067c8d8e1
2022-04-14 12:15:53 +05:30
Translation updater bot 3db9b0ee79 Localisation updates from https://translatewiki.net.
Change-Id: I5281fd0c4966250ae40f87f91425b5064eb6a1ba
2022-04-14 08:26:13 +02:00
Translation updater bot 557481d742 Localisation updates from https://translatewiki.net.
Change-Id: Ie7819c5d5d739f823ddf20f1a1e31f0a4bc13b0a
2022-04-12 08:13:54 +02:00
Translation updater bot c48692aba7 Localisation updates from https://translatewiki.net.
Change-Id: I588cba90c40459d0b2872d7a28b55a8355265d59
2022-04-11 08:13:45 +02:00
Translation updater bot 7c9ba1271a Localisation updates from https://translatewiki.net.
Change-Id: I627d02eabfc1c7bd93f987e1ac3d6baf2ccde59c
2022-04-08 08:27:15 +02:00
Ed Sanders bc8daa8ab4 Add small gap between reference body and re-use warning
Similar to the gap between paragraphs.

Change-Id: I27c2f042769876558259f6ea438c6dc39ad4ab40
2022-04-07 18:09:31 +01:00
Translation updater bot c5ededbf5f Localisation updates from https://translatewiki.net.
Change-Id: I64c54ae886651e74e7523baa7390fffd3a5f0825
2022-04-07 08:09:10 +02:00
Translation updater bot f10f542df0 Localisation updates from https://translatewiki.net.
Change-Id: Ie43cfcdde37c051a973f40a1c3a58cae3294bdae
2022-04-05 08:25:08 +02:00
jenkins-bot 896b20bc3d Merge "Page properties should always be strings" 2022-04-04 22:47:24 +00:00
Translation updater bot d075d71c97 Localisation updates from https://translatewiki.net.
Change-Id: Ifa3ada1e759347b3a5489a63bcbfa3174f6afc73
2022-04-01 08:26:17 +02:00
C. Scott Ananian e7dd9b5549 Page properties should always be strings
Bug: T305158
Bug: T237531
Change-Id: Ibfd84b52057baa8e249d321ec9df612efd6a29a6
2022-03-31 14:26:40 -04:00
Translation updater bot a44cd7b49d Localisation updates from https://translatewiki.net.
Change-Id: Ia0d79d5034a2d7cb4d8c82ac91e5261bcd009a5b
2022-03-31 08:35:32 +02:00
Translation updater bot dd39133478 Localisation updates from https://translatewiki.net.
Change-Id: I23022e9d6c6dd63370fcec6297229618ef0f8120
2022-03-28 08:20:29 +02:00
Translation updater bot e67d53611e Localisation updates from https://translatewiki.net.
Change-Id: Ic70268a26a93082664119cce14f6ee45d093adc2
2022-03-24 08:33:59 +01:00
Translation updater bot c5fb76bf0f Localisation updates from https://translatewiki.net.
Change-Id: If04ea9e3b354150e832207d3a6f0d02082d25f3a
2022-03-23 08:25:07 +01:00
Translation updater bot 08eed806bb Localisation updates from https://translatewiki.net.
Change-Id: I56e38ba969a8634d8ac871975a86ae421020886e
2022-03-17 08:36:47 +01:00
Translation updater bot 2d0c1d174e Localisation updates from https://translatewiki.net.
Change-Id: I191df51fc31dfdfbd0d48e077473e26839f0ff8c
2022-03-16 08:07:22 +01:00
Translation updater bot ac96942bd7 Localisation updates from https://translatewiki.net.
Change-Id: I58b11a3ee64ce165a5e3c15e892c5115989366a7
2022-03-14 08:13:39 +01:00
Translation updater bot 212a1349ec Localisation updates from https://translatewiki.net.
Change-Id: I3f8729b6c5d2ad9fa78c69f7416e19a1b2e2db72
2022-03-11 08:32:09 +01:00