You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hm, out of curiosity then how do the other templating languages do this? For example that identical code works in Mustache just changing it to {{ and }} instead of <%= and %>
It's a scoping mechanism. Those symbols determine that code begins and ends, code which has it's own syntax. For strings there is no further syntax to be parsed through, you can just have a string.
There is no way to differentiate when `"<%= ... %>" is meant for code and when it coincidentally happens as a string, therefore the syntax compromises and says it's always a string because it doesn't know any better.
If my explanation does not suffice as it might be confusing, try to learn more about regular expression or even how compilers and interpreters "tokenize" your code. Hope this helped any way.
For example
It's a solid color inside of the quotes. It should have different colors for things like
<%=
and%>
andthumbnail
The text was updated successfully, but these errors were encountered: