Feature summary Add a frame method to scribunto to create child frames and process arguments with a limited subset of the preprocessing that frame:preprocess would do.
The subset of frame:preprocess: the parsing that is applied on arg input to module invocations.
An example of this problem:
{{#invoke:test|dump_args|== {{!}} wikitext == * to [[wikipedia:HTML|HTML]] conversion * should ''not'' happen now}}
If a Lua table of the same raw args are passed through frame:preprocess, that becomes:
p.dump_args(frame:newChild{ args = {"== {{!}} wikitext ==\n* to [[wikipedia:HTML|HTML]] conversion\n* should ''not'' happen now"} }) == "==| '\"`UNIQ--h-0--QINU`\"' wikitext ==\ * to [[wikipedia:HTML|HTML]] conversion\ * should ''not'' happen now"
If you don't use frame:preprocess none of the argument wikitext is expanded by frame:newChild and that's also wrong to me.
Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
- Matching behaviour between templates and modules for raw argument tables in parent or grandparent frames.
- Unit testing of Scribunto modules
Benefits (why should this be implemented?):
Would make it much easier to test modules and follow the exact output produced from the Scribunto module's input.