assume Module:Thisone
function m.func(frame) local t = frame:preprocess(frame.args[1]) -- do something with expanded template return mw.text.nowiki(t) end
function makes no sense, but is only provided, to show the problem.
called with {{#invoke:Thisone|func|1={{!}}}} works
called with {{subst:#invoke:Thisone|func|1={{!}}}} template is not expanded in func