Hello, Currently, comments in EEX are designated using <%# *commented out content * %>. You may comment out multiple lines of EEX/HTML using this, such as
``` *<%#* *<div>* *<p></p>* *</div>* * %>* ``` This works fine, if the content being commented out is pure HTML, that is, if the content contains no %> of its own. The issue is that when commenting out Elixir template code, the compiler interprets the *very first *%> as the designated end of the comment. So if you had commented code like this: ``` *<%#* *<%= for i <- 1..5 do %>* <span><%= i %></span> <% end %> %> ``` The commented code is highlighted in bold, while the rest is to be parsed by the compiler, and will result in a compilation error for mismatched braces. The issue persists for single-line comments as well. I suggest that we either: 1. Terminate comments with #%> instead of %>, but this would be a shift from the currently accepted idea of ending all template tags with %>, such as <%= ... %>. 2. Improve the EEX syntax parser to check for well-formed comments in EEX. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/9d2a0058-6895-4ffe-ae4a-6e8a583095ef%40googlegroups.com.
