Commented code - magic disappearance

I am reworking a HTML Heex template and wanted to temporarily comment out a part, so I used the traditional method of:

<%= ref.type %> => <%#= ref.type %>

After saving which triggers a format, that code is gone…

I know now that my incantion is wrong, I at least need to write it as <%= # ref.type %>, or put the whole line between <%!-- --%>, but still it is strange.

1 Like

Yeah, I ran into this at some point as well. Even with <%# “deprecated” the content shouldn’t be removed, but if touched transformed to use <%!--.

yeah, or just give a syntax error.