Handlebars-Net / Handlebars.Net

A real .NET Handlebars engine
MIT License
1.24k stars 214 forks source link

Last letter cut off when using keys set in context since v2.0.3? #500

Closed oformaniuk closed 2 years ago

oformaniuk commented 2 years ago

Discussed in https://github.com/Handlebars-Net/Handlebars.Net/discussions/499

Originally posted by **cletom** February 4, 2022 Hi, I always used to get general info via Handlebars from context. Therefore, I defined the values as follows: ``` var context = ImmutableDictionary.Empty .Add("Name", "abcd"); ``` and I was able to receive the value I set using `{{.Name}}` which worked fine until v 2.0.2. When doing the same thing with v2.0.3 or later I always get an Error telling me `Nam is undefined` so it seems like somehow the last letter gets cut off since v2.0.3. If I add any sign, e.g. if I use `{{.Name1}}` i receive the value I set for "Name". I already debuged into my code and the context contains the correct key/value pairs. Does anyone know what I have to do to make this work again or is there a bug in the library since v2.0.3? Thanks