There have been a few different takes on a fix here, but at the moment code like this:
<textarea>
some content
</textarea>
Will always be parsed as if you had written <textarea>some content</textarea>. This is perfectly reasonable when the goal is to precompile templates for actual rendering (e.g. what Ember does) but it completely breaks the ability of codemod utilities to properly rewrite / update in a source <-> source scenario.
After this change, @glimmer/syntax will be able to pass through its own mode (which matches the type added here) and already opts folks in to this mental model. That mode is used by tools like Prettier and ember-template-recast already.
There have been a few different takes on a fix here, but at the moment code like this:
Will always be parsed as if you had written
<textarea>some content</textarea>
. This is perfectly reasonable when the goal is to precompile templates for actual rendering (e.g. what Ember does) but it completely breaks the ability of codemod utilities to properly rewrite / update in a source <-> source scenario.After this change,
@glimmer/syntax
will be able to pass through its ownmode
(which matches the type added here) and already opts folks in to this mental model. Thatmode
is used by tools like Prettier andember-template-recast
already.References:
\n
for<pre>
and<textarea>
) was originally implemented in https://github.com/tildeio/simple-html-tokenizer/pull/59.