-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making expressions case insensitive #1302
Comments
To be more clear.... I just want to get an idea of where in the source code I would make such a change. |
This doesn't sound ideal. It'll probably be easier for you to handle it from your object instead of have a breaking change like this request handle it. |
I wouldn't accept this as change to the library either, but I found this function in the compiler api, which indicates that it is possible to change this behaviour without changing Handlebars itself. |
While trying to answer #1302, I noticed that the compiler-api example did not work in (because `nameLookup` is actually at the prototype). This example has a jsfiddle that proves it is working.
I have updated the compiler-api example. It does not solve your exact issue (it only performs lookups in lower-case, not case-insensitive), but it is a starting point. I believe you can find out the remaining parts by yourself. However, looking at this Stackoverflow post, I believe implementing case-insensitive lookups will be a rather large performance impact (not just some). What I describe in the example will probably reduce performance as well. |
I'd like to make it so expressions are not case sensitive.
For example, the following data:
would support both:
I looked through the source code and can't see where I would make such a change. I understand there may be some performance impact, but this would really help for my use case.
The text was updated successfully, but these errors were encountered: