Closed tmbb closed 7 years ago
-1 on this, @tmbb What is the problem with regex? I think, we should keep slim -> slime migration as easy as possible.
What is the problem with regex?
It just seems brittle. But I admit I didn't try to "break" it to see how hard it would be. But yeah, compatibility with Slim is probably more important than this (I've never used Slim so I don't really care about compatibility).
If I understand this code correctly, you seem to be useing some Regex-based "hack" to determine whether you need to add an
<% end %>
tag to the block. Since you're trying to keep "close to your elixir roots", wouldn't it be better to copy what EEx does and force the user to add theend
tag explicitly? for example:would become:
I think this would be easier to compile and conceptually simpler because it'd be closer t normal elixir code.