Module talk:Format link

+target
I request the module be edited to reflect the changes in Special:PermaLink/1062625990, which add a target parameter. The intention of this parameter is mostly for humor (to look like a fancy link to one thing but really be a link to another thing) in talk and project space. It also has some use in format linkr as it can allow users to link to pages which would be URL-encoding converted right now. Tests were added in Special:PermaLink/1061891226.

Psiĥedelisto (talk • contribs) please always ping! 16:04, 29 December 2021 (UTC)


 * I don't see the benefit of this change given that the first positional parameter already specifies the target, and the second already specifies the display. It seems like it complicates the code needlessly, especially as implemented (I'd override the output of  rather than integrate a second parameter to it). That said, perhaps I'm not interpreting the use-case quite right. What does this add that the template/module can't already do? {&#123; Nihiltres &#8202;&#124;talk&#8202;&#124;edits}&#125; 18:21, 29 December 2021 (UTC)
 * I don't mind reimplementing, but we should probably agree it's useful before I bother. So, consider e.g. which would create . It is intended mostly for use with format linkr, mostly where you rely heavily on that template's auto-formatting to remove underscores, URL encoding, etc., and is useless when   is given. All three should never be given. Psiĥedelisto (talk • contribs) please always ping! 19:55, 30 December 2021 (UTC)
 * I think I might still not understand—in particular, the double pipe in your example really complicates it (is it an error?)—but translating to a functional goal, my guess is that you essentially want the option of applying the link formatting to the display, so that e.g.  would resolve to  . Is that a reasonable interpretation? I'm concerned that it's over-specialized, but if it isn't awful to implement and doesn't introduce edge-cases to extant uses, I don't see why not. {&#123; Nihiltres &#8202;&#124;talk&#8202;&#124;edits}&#125; 21:27, 30 December 2021 (UTC)
 * Not an error. It skips display, which is also possible. Your example, byte for byte, already works with my sandbox version: . Now, whether or not this is marginal use is somewhat debatable…I think more people would use format linkr if they knew about it, because it really speeds up section linking, especially on foreign-language wikis (I bet this is why it was so quickly copied to Vietnamese Wikipedia). URL encoding and underlines really slow me down. Psiĥedelisto (talk • contribs) please always ping! 22:24, 30 December 2021 (UTC)
 * I thought of another use for the feature, which I just used on Talk:Furry fandom—often I want to link to a section in the article but write it on talk. So I subst'd the /sandbox form of format linkr with args to get § BDSM. That's actually very useful in practice, so I hope you'll reconsider this feature's utility. Psiĥedelisto (talk • contribs) please always ping! 02:20, 31 December 2021 (UTC)

I think you've made the case for including the feature, but I'd like to see a sandbox version that doesn't pollute parseLink, so as to uphold the single-responsibility principle. I'll poke at making a version like that; the main annoyance is that I'll probably need to extract the functionality that does the  to separate it from the part that makes a. I'll probably work on that, oh, next year (remember the current date). ;) {&#123; Nihiltres &#8202;&#124;talk&#8202;&#124;edits}&#125; 20:31, 31 December 2021 (UTC)
 * Deactivating edit request since I see no need for an uninvolved template editor to do anything here (Nihiltres is an admin and can make then change themselves once they are satisfied) * Pppery * it has begun... 05:16, 1 January 2022 (UTC)
 * Thanks. Psiĥedelisto (talk • contribs) please always ping! 10:11, 4 January 2022 (UTC)
 * I've implemented a version that's a bit cleaner. Would you please review it? It passes extant tests, but I think that we could probably add a few more to make certain edge-case behaviours more explicit. {&#123; Nihiltres &#8202;&#124;talk&#8202;&#124;edits}&#125; 22:53, 1 January 2022 (UTC)
 * Only had one suggestion, to use Module:Error. . Looks good!~ Psiĥedelisto (talk • contribs) please always ping! 10:11, 4 January 2022 (UTC)
 * Great, I'll make the update as soon as I've got the time to also update the documentation with all the new stuff. :) {&#123; Nihiltres &#8202;&#124;talk&#8202;&#124;edits}&#125; 18:07, 4 January 2022 (UTC)