Would it be acceptable to add an option to preserve whitespace within JSXChildren? I am building a framework for generating source code with JSX and in that context whitespace is important to preserve. In particular, if I had something like:
which compiled to something like: ["\n def ", name, "():\n ", $createComponent(PythonFunctionBody, {})], then I can use the leading whitespace for the first text node to establish the baseline indent level, and book-keep subsequent indent level increases within my render function.
This seems reasonable. I'm not sure if this would impact walks at all. It should be the same and match up I imagine. But that would be my main consideration.
Would it be acceptable to add an option to preserve whitespace within JSXChildren? I am building a framework for generating source code with JSX and in that context whitespace is important to preserve. In particular, if I had something like:
which compiled to something like:
["\n def ", name, "():\n ", $createComponent(PythonFunctionBody, {})]
, then I can use the leading whitespace for the first text node to establish the baseline indent level, and book-keep subsequent indent level increases within my render function.