The very basics... auto-formatting in .eex

That’s the closest I’ve got, too. Which plugin do you use?

Here’s the results/issues I’ve seen so far:

Prettier:

Won’t parse EEx that contains strings due to the extra double quotes, and so fails to format entirely:

Beautify:

This did format, but had the same double-quote issue with EEx tags that added a \n before the closing quote. Also added a random newline between the closing </script> (although perhaps that’s standard Beautify behaviour? :man_shrugging:

I have a feeling I cannot possibly have exhausted all the options. Are there any other options I’m overlooking?

Thanks in advance!

1 Like