Commit graph

16 commits

Author SHA1 Message Date
alex4401 eb55d89e77
Output any image candidate markers generated by PageImages (#105)
* Output any image candidate markers generated by PageImages

wikimedia/mediawiki-extensions-PageImages#768464d changed how lead images are identified within PageImages, and since then an HTML comment in the form of `MW-PAGEIMAGES-CANDIDATE-$ID` is output by`doParserModifyImageHTML`, where the ID is an index in the extension output data's list of image metadata. These comments should find a way into the ParserOutput as the extension looks for those comments in a chosen document fragment when identifying qualifying candidates out of all images gathered through `onParserModifyImageHTML`.

This change does not affect compatibility with older PageImages (only the "new" hook's being called already).

* Default htmlAfter to null and update tests to expect it

Follow-up to my previous PageImages commit.
2023-07-24 11:13:33 -06:00
Universal Omega 44c3389d5a
Add use statements (#64) 2022-03-11 13:35:51 -07:00
Universal Omega de39a61206
Fix tests (#41) 2021-12-15 15:01:13 -07:00
Universal Omega 42778958ab
Add PHPUnit tests (#7) 2021-09-11 17:07:07 -06:00
lkucharczyk c11b8f6b68 Add unit tests 2019-02-03 17:49:06 +01:00
lkucharczyk e84e5c1e6c Add support for name attribute 2019-02-02 23:34:48 +01:00
Luqgreg ad504e4c07 Add data-source attributes to html output 2018-12-27 02:01:19 +01:00
Luqgreg 2317398cc2 Remove HtmlHelper 2018-10-07 16:44:55 +02:00
Luqgreg f00a40c3b8 Code refactoring 2018-10-02 09:55:32 +02:00
Luqgreg 52d5d28c82 Set type of NodeMedia aliases to 'media' 2018-08-26 16:08:31 +02:00
Luqgreg 877bc2469c Fix unit tests 2018-08-22 16:22:30 +02:00
Luqgreg 8762225606 Code refactoring 2018-08-16 11:25:53 +02:00
Luqgreg c9d1bd4f10 Increase code coverage 2018-08-13 16:31:50 +02:00
Luqgreg 3007c92c62 Fix unit tests 2018-08-12 17:50:16 +02:00
Luqgreg 3a3fd95ec8 Major code cleanup (#10) and bumping version to 0.2 🎉 2018-08-09 12:36:52 +02:00
Luqgreg ad17140243 Fix unit tests 2018-08-08 11:42:22 +02:00