* Continues on 3311936a5e15c2080d8040dd605e58fa33407e60 and
05a8947fef30e6fc4519b822b0931d965d57efa8
* With some whitespace cleanup.
Change-Id: I32109c6fd35439914df4df06432376d6a968268b
Keep all state in the DOM post-processor in dom.processRefs.js, so
that there's no need to reset the extension and it can be safely
used for multiple documents
Change-Id: Iacf7e3003929f74b76774d3e765c792991700e51
Once all the missing references have been added, ensure that the
the reference index is reset to 0.
Also related to T93715.
Change-Id: I00a2b2da9116602d2eb00e782d4832cf580e4b59
Highlight the target reference when the user clicks a reference link,
and also highlight the note in the text when he clicks the backlink.
This is done using the :target selector and a light blue background-color.
The color (and the rest of the code) are from English Wikipedia, from where
it has been copied to many other wikis, so the feature itself and especially
the color seem to be agreed on.
Browsers that don't support the :target selector (notably Internet Explorer 8
and below) will just ignore the new style and fall back to current behavior.
Wikis that have added this code to their common.css can remove it, but
of course nothing will break when they keep the duplicate code.
Bug: T10303
Change-Id: I5775daf6934516ce9c98841399e5a358195c1374
Instead of outputting a <ref>'s HTML in both data-mw and in
<references>, output it only in the later and point to it from
data-mw.body.id.
Also preserve data-parsoid for <ref>s text in <references>, as now
that's the only representation of it.
To correctly do html2wt when there are <ref>s inside <references>
we need access to the main document DOM when serializing, so also
ensure that env.page.dom is correctly set (it was only set in v2
before).
Updated tests results and blacklist (some tests now pass).
Change-Id: I0fa7ad692585af19136909bfec39db9868b137c5
Recent core update to gallery display includes srcset support; one of the
parser test cases for Cite uses a gallery and needs updating to match.
Bug: T64709
Change-Id: I6283415e2f7608d9a5c53bc94804fd95a79d3793
* Fixed parser test output of one test to add unique ids. Output for
other parser tests modified in f528f508 still need fixing up.
Left for a separate patch.
Change-Id: I04546c2a590930121d960239a1954b26771e9c80
* <references /> was not appearing on its own line and was
instead getting tacked onto previous line of wikitext output.
* Change in blacklisted wt2wt test shows that the new output
is better.
Change-Id: Ie82401a3bc6082b733339e2456810b6b1c87529a
This patch emits a reflist for all ref groups that still have
<ref>s in them at the end of the document. Currently Cite.php only
does so for the default group. See also T88290.
On html2wt the missing <references> are added to the wikitext,
which makes the wikitext correct. Selser catches this if not part
of the edit.
Change tests to include an explicit <references /> tag, and add
one for explcitly testing that they do get added. This last one
has to be blacklisted as the new <references /> don't appear with
selser.
Change-Id: I79af2c34481cadbf0d68d9571928979adf559b58
From prod error logs:
Undefined index: 0 in Cite_body.php on line 396
Undefined index: 1 in Cite_body.php on line 396
Undefined index: 2 in Cite_body.php on line 396
Undefined index: 3 in Cite_body.php on line 396
Undefined index: follow in Cite_body.php on line 396
Change-Id: Id727f2fd7e72d8c4ceb74fdac42885d5c030b4af
One particular case is that Cite.php considers equal a name and
its encoding, i.e. "a & b" === "a & b". Added a new test for
this case, but blacklisted it on html2wt, wt2wt and html2html due
to a different problem with how Parsoid encodes entities. This
will be investigated separately, as a simple fix could break
unrelated cases.
Also updated tests and blacklist to the new ids.
Change-Id: I87637a1dc812a3a8f29327b9e6c0040b22a651c4