Last modified: 2014-02-12 23:38:30 UTC
lsth parser test 6 ('transclude offset section -w- subs'): !!test transclude offset section -w- subs. !!input {{#lsth:LsthSections|2}} !!result <p>sec 2 </p> <a name="3"></a><h3><span class="editsection">[<a href="/index.php?title=LsthSections&action=edit&section=3" title="LsthSections">edit</a>]</span> <span class="mw-headline">3</span></h3> <p>sec 3 </p> !!end Result: Running test transclude offset section -w- subs.... FAILED! --- /tmp/mwParser-150703348-expected 2012-12-13 21:07:12.533078402 +0100 +++ /tmp/mwParser-150703348-actual 2012-12-13 21:07:12.537078352 +0100 @@ -1,5 +1,5 @@ <p>sec 2 </p> -<a name="3"></a><h3><span class="editsection">[<a href="/index.php?title=LsthSections&action=edit&section=3" title="LsthSections">edit</a>]</span> <span class="mw-headline">3</span></h3> +<h3><span class="editsection">[<a href="/index.php?title=LsthSections&action=edit&section=T-1" title="LsthSections">edit</a>]</span> <span class="mw-headline" id="3">3</span></h3> <p>sec 3 </p> The problem is not the <a name>, but the section link: it was &section=3 before, but it's &section=T-1 now. Clearly, the former was correct, while the latter is not (it makes a link to the first section on LsthSections, which is section '1', not section '3'.
This has probably been broken since MW 1.12 - T-1-based links were introduced then: http://www.mediawiki.org/wiki/Release_notes/1.12 The tracking bug for these issues is #4899, which I've added as dependent on this bug. Bug #38614 might also be related...
The edit links are OK for lst transclusions (added by Tim in https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/LabeledSectionTransclusion.git;a=commitdiff;h=f2caff9b ), so the logic on how to do this is available already. I don't have time to find out how it works exactly, however, at the moment :-)