Template talk:Tfm2

Incorrect extra space at end of links
When using the template Tfm2 according to the instructions as found in the template's documentation, we obtain:

Template:TemplateName
Propose merging Template:TemplateName with Template:OtherTemplate.
 * TemplateName
 * OtherTemplate

Your rationale for nominating the template. Set theorist (talk) 18:50, 25 June 2024 (UTC) Notice that a space character is appended to the end of most of the links produced in parentheses after the template name. In particular, the link labelled "subpages" points to Special:PrefixIndex/Template:TemplateName /, with an extra space before the final / symbol, thereby not linking to the correct list of subpages of the intended title, which would be obtained by the link Special:PrefixIndex/Template:TemplateName/.

The error seems to have been introduced some time between February 4 and 21, 2024, as seen by contrasting the following two examples:
 * Templates for discussion/Log/2024 February 4, where the "subpages" link correctly points to Special:PrefixIndex/Template:Interwiki copy/
 * Templates for discussion/Log/2024 February 21, where the "subpages" link points to Special:PrefixIndex/Template:Facebook page /, which is incorrect

The error does not occur with Tfd2, which works correctly.

Furthermore, if (against the instructions) we transclude Tfm2 by omitting "subst:", then it seems to work correctly. The code produces

which seems to be correct, without the trailing spaces.

I have no idea how to fix this. Can anyone figure it out? Set theorist (talk) 18:50, 25 June 2024 (UTC)