In LuaLaTeX, how would I go about capturing the content of an environment for (verbatim) processing by Lua? For example, consider something like
\begin{foobar}
Hello {World}
\end{foobar}
I'd like to be able to take the content of the environment and pass it to Lua, as in
foobar(" Hello {World}\n")
(and Lua would then eventually pass the processed version back to LaTeX, but I can presumably handle that).
