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
By reading the code, it seems to me that it only uses the es template regex if no interpolation is given (as per the docs as well), but it does not have any kind of logic for the escape regex (it always uses the one provided/the default).
Wouldn't it be the same to make the default regex one that includes both the es delimiter (${}) and the <% delimiters? By using the same logic the escape template can easily get both escape characters as well.
Our template method is pretty simple you can customize the regexes it uses to match delimiters though as _.templateSettings or options to the _.template method.
About version 4.17.11
although the
template
function allows using ES template literals it does not allow it to be escaped. Case in point:With lodash's template:
With template literals:
Is this a bug or does
template
not allow to escape template literals (as it can be disabled with a custom interpolator function)?The text was updated successfully, but these errors were encountered: