Closed ghost closed 5 years ago
I think it is feasible. Since I've been working today on refurbishing common-tags to improve composability, I might sneak in some other improvements. Sorry for not answering for so long.
The problem is in the inlineArrayTransformer
part. It's not too difficult to code, but the decisions to be made are hard. Once I wrap my head around this the html
tag will just work.
I'd be interested in this functionality as well. I'm storing some JSX in variables, then interpolating it with template literals. Having the indention work out of the box would be awesome!
I think I managed to do just that. This will be released in the upcoming next
version.
I've been learning about tagged templates and I discovered common-tags. It's so useful -- many thanks for it!
I was hoping that html might be able to handle nested, multi-line sections, such as you might produce with another html tagged literal. Then you could compose html and have the indenting magically work. But that doesn't seem to be the case.
Here's a test case. Would supporting something like this be at all feasible?