Template talk:Tfm2

Latest comment: 2 days ago by Set theorist in topic Incorrect extra space at end of links
WikiProject iconTemplates
WikiProject iconThis template (like all templates) is within the scope of WikiProject Templates, a group dedicated to improving the maintenance of Wikipedia's templates. This particular template is especially important to the project because it is used in the maintenance of other templates. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
WikiProject iconMerge
WikiProject iconThis template is within the scope of WikiProject Merge, an attempt to reduce the articles to be merged backlog and improve the merging process. If you wish to help, you can edit the page attached to this talk page, or visit the project page, where you can join the project and/or contribute to the discussion.
edit

When using the template {{Tfm2}} according to the instructions

{{subst:Tfm2|TemplateName|OtherTemplate|text=Your rationale for nominating the template. ~~~~}}

as found in the template's documentation, we obtain:

Propose merging Template:TemplateName with Template:OtherTemplate.
Your rationale for nominating the template. Set theorist (talk) 18:50, 25 June 2024 (UTC)Reply

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:

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

{{Tfm2|TemplateName|OtherTemplate|text=Your rationale for nominating the template. ~~~~}}

produces

Propose merging Template:TemplateName with Template:OtherTemplate.
Your rationale for nominating the template. Set theorist (talk) 18:50, 25 June 2024 (UTC)Reply

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)Reply