On enwiki, using mw.text.unstripNoWiki on <math> tags will give you the raw HTML output. Sample code:
local p = {}
function p.main()
local frame = mw.getCurrentFrame()
return mw.text.unstripNoWiki(frame:preprocess('<math>foo</math>'))
end
return pWhen calling that from the debug console with =p.main(), I get <img class="mwe-math-fallback-image-inline tex" alt="foo" src="//upload.wikimedia.org/math/a/c/b/acbd18db4cc2f85cedef654fccc4a4d8.png" />. Instead, it should be showing the strip marker.