Taxobox tests?

Fragment of a discussion from Talk:Main Page

@Hexasoft: I think you can't directly use wiki markup directly in a module (I think it is possible, despite this, but you need to do some extra stuff to do it—you can't generate "foo {{bar}} bazbazbaz" just with return "foo {{tl|bar}} {{#invoke:String|rep|baz|3}}").

The reason I say this is because the section "Returning text" on mw:Extension:Scribunto/Lua reference manual says this:

The module function should usually return a single string; whatever values are returned will be passed through tostring() and then concatenated with no separator. This string is incorporated into the wikitext as the result of the {{#invoke:}}.
At this point in the page parse, templates have already been expanded, parser functions and extension tags have already been processed, and pre-save transforms (e.g. signature tilde expansion and the pipe trick) have already happened. Therefore the module cannot use these features in its output text. For example, if a module returns "Hello, [[world]]! {{welcome}}", the page will read "Hello, world! {{welcome}}".
On the other hand, subst is handled at an earlier stage of processing, so with {{subst:#invoke:}} only other attempted substitutions will be processed. Since the failed substitution will remain in the wikitext, they will then be processed on the next edit. This should generally be avoided.

So, most likely, the code preprocess("{{PAGENAME}}") in a Lua module would continue to be preprocess("{{PAGENAME}}"), instead of compiling to preprocess("pagename").

(The reason I made this reply is because I saw preprocess("{{PAGENAME}}") in Hexasoft's reply that is the 5th reply (including the first reply, which was by Hexasoft) in this thread.)

Lemondoge ( T C )20:38, 2 April 2016