Template talk:MultiReplace

Template-protected edit request on 12 April 2018
Please add  before the   to make the template subst cleanly. &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 19:02, 12 April 2018 (UTC)
 * ✅ by  &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 20:59, 12 April 2018 (UTC)

Superfluous input sanitization
I see that you have added the following lines:

I cannot understand the purpose of this check. Empty input is perfectly valid and nothing should be done about it. If this assignment takes place, then argument 1 is taken from the parent frame, but other arguments are taken from the current frame. This appears incorrect to me and I suggest that it should be removed. Petr Matas 13:10, 25 April 2018 (UTC) PAGE ]]) 15:15, 25 April 2018 (UTC) PAGE ]]) 15:16, 25 April 2018 (UTC) PAGE ]]) 18:41, 25 April 2018 (UTC)
 * The intent was to allow for a template to invoke the module with the form main without having to do main. If both the module invokation and the template call are blank, it will still be processed as a blank input. It's syntax I copied from other modules, where it's used because it allows the module to distinguish between blank (1) and missing input in the template call, but if there isn't a need to do that here, it can be removed. --Ahecht ([[User_talk:Ahecht|TALK
 * Forgot to ping Petr Matas. --Ahecht ([[User_talk:Ahecht|TALK
 * Thank you for your explanation. Distinguishing between blank and missing input will not work here, because the assignment does not work as expected (args is not an ordinary table). Therefore the better readable invocation main becomes equivalent to the shortened one.
 * What I dislike about your solution, is that the behavior is different when the input happens to be empty. Consider someone using in their template main. Now if the template's parameter 2 is empty or missing, MultiReplace will use the template's parameter 1 instead, which is unexpected and incorrect.
 * A cleaner way to distinguish between empty and missing template input: Enable a module to be invoked like this: main. Such invocation is self-explanatory and the module needs no hacks, which could cause unexpected behavior. Petr Matas 18:35, 25 April 2018 (UTC)
 * That's fine. I'll go ahead and remove it. --Ahecht ([[User_talk:Ahecht|TALK
 * I don't get why any of these changes were necessary, as opposed to keeping the system "everyone invokes the module through MultiReplace" &#123;&#123;3x&#124;p&#125;&#125;ery (talk) 23:51, 28 April 2018 (UTC)
 * An important improvement is the provision for a simple call  from lua, because calling templates from there is not so straightforward. The provision for a call using main was added just for completeness, because it was simple to do so. The rest really serves no purpose, because the input always has to be provided and therefore there is no point in distinguishing an empty one from a missing one. Consider it to be just a "what if..." speculation with no direct consequences. Petr Matas 09:33, 29 April 2018 (UTC)

Template-protected edit request on 14 November 2022
There is a global variable that should be fixed, as I did here. Thanks in advance. Od1n (talk) 00:44, 14 November 2022 (UTC)
 * Requesting an additional change. Currently, if the pattern contains some HTML code, and an error message is displayed, the HTML code is interpreted, whereas it shouldn't be.
 * For example,
 * Currently outputs: MultiReplace: Unpaired argument:
 * But it should be: MultiReplace: Unpaired argument:
 * Another example, wiki markup is interpreted as well :
 * Currently outputs: MultiReplace: Unpaired argument:
 * But it should be: MultiReplace: Unpaired argument:
 * To fix this issue, a  should be added, like I did here. Od1n (talk) 01:14, 14 November 2022 (UTC)
 * ✅ both * Pppery * it has begun... 20:58, 15 November 2022 (UTC)