Commit graph

3188 commits

Author SHA1 Message Date
Thiemo Kreuz a00b8d990d Add test cases for impossible follow vs. rollback edge case
While working on the patch I4303642 I was worried about the line

array_pop( $this->refCallStack )

in the rollback code. Since the patch changed the position of follow
elements in the stack, an array_pop() would pop different elements.

It turns out this is impossible. Rollbacks are only done for <ref>
elements inside a <references> tag, immediatelly after reaching the
closing </references>. It's impossible to use follow="…" inside
<references>. It will not be added to the stack, and therefore not
rolled back.

Even if the edge case would be possible, the *old* code that placed
follow elements on the *other* side of the stack would have been
wrong then.

The test cases in this patch try to hit this edge case, and are
expected to not be able to do so.

Change-Id: I4380bf443db17c6214dbfa2cbda62b46db04258a
2020-04-01 09:03:19 +00:00
Translation updater bot d488194c0d Localisation updates from https://translatewiki.net.
Change-Id: I6244fc7ef59efe745952424e3fc8a7445fd1c64e
2020-04-01 08:24:32 +02:00
jenkins-bot 45f4990e34 Merge "Add a newline in wikitext before autogenerated reflist" 2020-03-31 19:37:34 +00:00
Bartosz Dziewoński 90697ffe43 Add a newline in wikitext before autogenerated reflist
Previously the reflist was added at the end of the last line of text,
which messes up paragraph wrapping (as seen in many test cases), and
generated invalid HTML when the last line was a list item (T148701).

Bug: T148701
Change-Id: Ifc873fc913e717026d80d54b570c594d1073fb42
2020-03-31 19:00:51 +00:00
jenkins-bot a00401fdfc Merge "Remove not needed code without changing anything" 2020-03-31 18:30:21 +00:00
Thiemo Kreuz 53b043f28f Remove not needed code without changing anything
This removes a few tiny pieces of code, and a large chunk related to
incomplete follow="…" attributes (see T240858). It turns out we don't
need to insert elements at the top of the ReferenceStack::$refs
array, because this array is reordered anyway in
ReferencesFormatter::formatRefsList()!

Incomplete follow refs don't have a number, and are ordered to the top
because of this, as before. This doesn't change with this patch.

Change-Id: I43036420be22feb8f0f287d9ccee2afd317df2a9
2020-03-31 18:15:14 +02:00
Translation updater bot 95168a2d9d Localisation updates from https://translatewiki.net.
Change-Id: I6cb5440acc405e47ae036d52054c3b55badc6d9a
2020-03-31 08:28:27 +02:00
libraryupgrader 6d9d6c3398 build: Updating gonzales-pe to 4.3.0
* https://npmjs.com/advisories/1179

Change-Id: I369aad2115d7f577b4cbabea2b9b2be4bd3e35fb
2020-03-31 00:54:54 +00:00
jenkins-bot ce919471e8 Merge "Localisation updates from https://translatewiki.net." 2020-03-30 07:24:31 +00:00
Translation updater bot 85b6cb3d73 Localisation updates from https://translatewiki.net.
Change-Id: Id1a1246dba33eb7fdb485832fe7a3f2303a7f7bc
2020-03-30 09:13:15 +02:00
Translation updater bot 653797fcbb Localisation updates from https://translatewiki.net.
Change-Id: Ic229386c7d1427e46f7631e820453db3f28e721b
2020-03-30 08:38:17 +02:00
Translation updater bot eb029f75d7 Localisation updates from https://translatewiki.net.
Change-Id: If485ce8bfded0af4bad5c5261f1d8c35dec9a584
2020-03-27 08:40:34 +01:00
Translation updater bot bb861b561e Localisation updates from https://translatewiki.net.
Change-Id: Ifff55208c75ac8a7dc415eba0f9f8cbb1468ce6c
2020-03-25 08:32:08 +01:00
Translation updater bot 349b60bad5 Localisation updates from https://translatewiki.net.
Change-Id: I5ac115192f325870dea17cdafac9643e70a90959
2020-03-24 08:48:36 +01:00
Translation updater bot 6a54e2e76a Localisation updates from https://translatewiki.net.
Change-Id: I6e4f8b4bf4be6e12d1eb8c3b3f74254be5ab72cc
2020-03-23 09:02:37 +01:00
libraryupgrader 942eaa9440 build: Updating npm dependencies
* mkdirp: 0.5.1 → 0.5.3
  * https://npmjs.com/advisories/1179
* eslint: 6.5.1 → 6.8.0
  * https://npmjs.com/advisories/1179
* svgo: 1.2.2 → 1.3.2
  * https://npmjs.com/advisories/1179

Change-Id: Idcd43a7658825b99759a5351c6a3545444e5dfda
2020-03-20 20:30:52 +00:00
Translation updater bot 121c92c597 Localisation updates from https://translatewiki.net.
Change-Id: I0ae46230230446862f0c18e9c3112ce9562f9298
2020-03-20 08:23:36 +01:00
Translation updater bot 6bd6568602 Localisation updates from https://translatewiki.net.
Change-Id: I0fc83c66b48f66591a400b20bae2a7fff9fd2a17
2020-03-19 08:32:47 +01:00
Volker E e5b6ae0323 Reduce reference code padding
Don't use inherited one, but set a small one instead.

Change-Id: Ib38102478ed53a6e4fd8cc25d118f346f81758bb
2020-03-18 07:16:13 +00:00
jenkins-bot 3dc212e730 Merge "Fix cite error ref code color contrast ratio" 2020-03-18 06:46:31 +00:00
libraryupgrader 3df0f16358 build: Updating minimist to 1.2.5
* https://npmjs.com/advisories/1179

Change-Id: Ide732616d562684edab9a71c1998976297b54629
2020-03-18 04:41:02 +00:00
Volker E 774fda06a9 Fix cite error ref code color contrast ratio
Using `background-color: transparent` here to step away from inheritance of whatever `code` would provide theme-independent.

Bug: T247903
Change-Id: Ibeb6b68556b6ad83dacaf1b8fed59a2b971c0221
2020-03-17 21:43:17 +00:00
Translation updater bot 60c5e728ea Localisation updates from https://translatewiki.net.
Change-Id: I55031c78575c34b6edc1123ec24810c497f29a85
2020-03-17 10:23:55 +01:00
Translation updater bot ed873e549b Localisation updates from https://translatewiki.net.
Change-Id: I57e7504a86e8f4b992d2ca3e4d9dace705605090
2020-03-16 14:29:37 +01:00
Translation updater bot a840790cdb Localisation updates from https://translatewiki.net.
Change-Id: Ia6e8512c204d5e0068437f55f30234f195e9a4f2
2020-03-13 08:53:57 +01:00
Translation updater bot c318b8d720 Localisation updates from https://translatewiki.net.
Change-Id: I5d5ff7a30904e75eec4797f48215c0ad64d7bc3d
2020-03-12 08:42:12 +01:00
Timo Tijhof ce27a400e1 CiteHooks: Remove wgResourceModules check (redundant with isModuleRegistered)
The isModuleRegistered() method was introduced a few years ago,
when the load order in ResourceLoader was undergoing a change.

It used to be that hooks like were run first to register modules, and then
wgResourceModules was registered afterwards. This was reversed to disallow
mutating the config at run-time from foreign modules and to allow better
caching and error detection.

It's been several years since then, so this redundant check is no longer
needed. ServiceWiring.php in MW core for ResourceLoader always processes
config and extension.json first before this hook is called.

Bug: T247265
Change-Id: I466f1fa70b8f0e9fe5e8e8df90bb0001b3329b87
2020-03-10 16:18:46 +00:00
libraryupgrader 5f51fec081 build: Updating acorn to 7.1.1
* https://npmjs.com/advisories/1488

Change-Id: Iacb4464bc9c81a45b45ad22fa98bbb05dbd31c6b
2020-03-07 23:06:54 +00:00
jenkins-bot e15743b74d Merge "Fix unit tests for whitespace change in Html5 fragments" 2020-03-06 16:55:25 +00:00
Translation updater bot 11dffd7ca8 Localisation updates from https://translatewiki.net.
Change-Id: Icbd41637a59cacc9ee620401d574c994adc67666
2020-03-06 08:17:36 +01:00
Translation updater bot 7837135165 Localisation updates from https://translatewiki.net.
Change-Id: Ic671cdc23fdb943fcf90fdccfce4e115f18c82e8
2020-03-05 08:37:47 +01:00
Translation updater bot 197c13c801 Localisation updates from https://translatewiki.net.
Change-Id: I95723982546c984c936fae703c01b91f6fc8a9ee
2020-03-03 08:13:55 +01:00
Translation updater bot 157130b75a Localisation updates from https://translatewiki.net.
Change-Id: I75ed92076fad74276c9ed0c176aed183bc7c0a23
2020-03-02 09:09:02 +01:00
Translation updater bot 1fc962e1fa Localisation updates from https://translatewiki.net.
Change-Id: I79fcb110c036c2533e9123b9faad4bea3c60a95d
2020-02-27 08:36:09 +01:00
Translation updater bot 5ce4cc479d Localisation updates from https://translatewiki.net.
Change-Id: Ib73625846daac60c79b184de8354e87116bd7f88
2020-02-26 08:24:28 +01:00
Brian Wolff 5ed973a49a Fix unit tests for whitespace change in Html5 fragments
Bug: T238385
Depends-On: Ie2b7c9429691e2c491c3359d5b400d8f078aa789
Change-Id: Ie2b7c9429691e2c491c3359d5b400d8f078ab111
2020-02-25 13:56:53 +00:00
Brian Wolff 1c6a92ca9b Temp disable test to work around circular dependency in unit test
Html5 fragment mode now bans whitespace per html5 spec

See Ie2b7c9429691e2c491c3359d5b400d8f078aa789

Change-Id: Ie6fa40798f06a358f6082110b4d8cc0028c80321
2020-02-25 04:38:06 -08:00
Translation updater bot a633c9d5dc Localisation updates from https://translatewiki.net.
Change-Id: Ie6fa40798f06a358f6082110b4d8cc0028c807d4
2020-02-25 08:52:07 +01:00
Translation updater bot fd79d68049 Localisation updates from https://translatewiki.net.
Change-Id: Ife3c127de785f3d436f676c4d6f4370b220358a1
2020-02-24 09:02:03 +01:00
libraryupgrader ece1d6a9a6 build: Updating npm dependencies
* grunt-stylelint: 0.13.0 → 0.14.0
* stylelint-config-wikimedia: 0.8.0 → 0.9.0

Change-Id: I2eb91238d8468051d3f62424f3025e6e6324d030
2020-02-20 19:43:20 +00:00
Translation updater bot 5b3640f635 Localisation updates from https://translatewiki.net.
Change-Id: Ie38542a1b29bd9d11bbfb98c08699e27041c1469
2020-02-20 09:26:30 +01:00
Translation updater bot 5684c8823e Localisation updates from https://translatewiki.net.
Change-Id: I59d1cfeae8f911fab2b95af322aedec0d1d66b0d
2020-02-19 08:23:11 +01:00
libraryupgrader 81e6643baf build: Updating composer dependencies
* mediawiki/mediawiki-phan-config: 0.9.0 → 0.9.1
* mediawiki/minus-x: 0.3.2 → 1.0.0

Change-Id: Ica218e63fd747980b7acc39ac7403f19239fa861
2020-02-19 01:25:06 +00:00
Translation updater bot 247e80d781 Localisation updates from https://translatewiki.net.
Change-Id: I5c9efab6cce150f6c58f2dc8dc9fba39c2f0cf7e
2020-02-17 08:45:44 +01:00
Translation updater bot e1423ecaf4 Localisation updates from https://translatewiki.net.
Change-Id: I6e0628876b7b6bc397924d4e9b1b62d7c8516f03
2020-02-14 08:25:22 +01:00
Translation updater bot ac2edf5f57 Localisation updates from https://translatewiki.net.
Change-Id: I125e052175b48a2cb2a44865a682b6cb88a6d676
2020-02-13 08:54:21 +01:00
jenkins-bot 7ee2e81ade Merge "Add two extreme follow edge cases back to parser tests" 2020-02-11 09:11:20 +00:00
Translation updater bot cb30637732 Localisation updates from https://translatewiki.net.
Change-Id: Ia93d4b3cf054b9c24a8b9eadd954c624354104dd
2020-02-11 08:18:57 +01:00
jenkins-bot 43cf5ac7bd Merge "Don't talk about follow being "broken" but "incomplete"" 2020-02-10 12:41:50 +00:00
Translation updater bot efaba3aef0 Localisation updates from https://translatewiki.net.
Change-Id: Ia7bafb7deb9353cdd95e598d924ef4e08e517116
2020-02-10 08:32:57 +01:00