Skip to content

The first parameter match/unmatch will overwrite all the subsequent same-spelling match/unmatch  #434

Description

@Ellaluo

The case-sensitive matching works well when there is only one variable of one spelling. When there are multiple variables of same spelling but different upper/lower cases, things get messged up. For example:

vartemplateString="Example {{TEST}} {{test}} | {{test2}} | {{TEST3}} {{test3}} | {{TesT}}";vartemplate=Handlebars.Compile(templateString);vardata=newExpandoObject();data.TryAdd("TEST","Upper");data.TryAdd("test","Lower");data.TryAdd("test2","Lower2");data.TryAdd("test3","Lower3");data.TryAdd("TesT","Last");varoutput=template(data);Console.WriteLine(output);

prints

Example Upper Upper | Lower2 | | Upper.

If I use Handlebars.js, it prints

Example Upper Lower | Lower2 | Lower3 | Last.

It looks like the first match/unmatch, messed up all the subsequent same-spelling match.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions