Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module talk:Module wikitext

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia

Template-protected edit request on 16 June 2026

[edit]

Please implement my changes in the sandbox, which add a function which can wrap exported packages, so stuff like TfD templates can be shown when a template or module uses a module nominated at TfD. Aasim (話すはなす) 19:35, 16 June 2026 (UTC)Reply

@Awesome Aasim: Sorry for the late response, but what exactly is the actual use case of this (or can you give an example)? I can't quite figure out what this change is meant to do. Aidan9382 (talk) 21:48, 26 July 2026 (UTC)Reply
This change is supposed to make it possible to add TfD tags around functions which export modules nominated at TfD. So if Module:Foo was nominated for deletion, if Module:Foo was nominated for deletion, all invocations would spit out the "see TfD" text. Aasim (話すはなす) 21:58, 26 July 2026 (UTC)Reply
Ok, I think I get it. My main concern here is replacing the output of every function that returns a string could make some meta-functions misbehave in very unpredictable ways, so it might make more sense being manually targetted. Also, judging from what I'm reading here, if two wrappers get defined by two different modules in the same call chain, one will supercede the other in a possibly very buggy way, so that might need some work.
On that note, I don't see why this needs to be implemented into this module directly. I feel like this might make more sense being made part of a current or new TfD-related module rather than just being placed into this module. Aidan9382 (talk) 22:18, 26 July 2026 (UTC)Reply
I was considering that as well but I don't know if that is the best approach. We would have to do the same for TfM, and there may be other future use cases where one would have to add in extra informational text before a module invocation. Aasim (話すはなす) 02:16, 27 July 2026 (UTC)Reply
In that case I still think it'd make more sense as either a new module (or an addition to a TfX module if it makes sense) which behaves similarly to your sandbox edit, in which you can wrap the returned p and specify which functions to hook and some text that'll be preprocessed and placed before/after the output to make adding any notice easier to module outputs. One thing that is coming to mind though, is how often is a module used directly in wikitext as opposed to through a template, which would probably be an easier point to insert a TfX notice at? Aidan9382 (talk) 12:43, 27 July 2026 (UTC)Reply