mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-11-16 13:51:04 +01:00
Fix HandlebarsContext ParseAndEvaluate method (#1213)
* Fix HandlebarsContext ParseAndEvaluate method * test * xxx
This commit is contained in:
1 parent
6f73dfe360
commit
4aaed2a6ca
4 files changed
+37
-1
No files matched your search
@@ -27,7 +27,9 @@ internal class HandlebarsContext : IHandlebarsContext
|
||||
|
||||
public object? ParseAndEvaluate(string text, object model)
|
||||
{
|
||||
if (Handlebars.TryEvaluate(text, model, out var result) && result is not UndefinedBindingResult)
|
||||
if (text.StartsWith("{{") && text.EndsWith("}}") &&
|
||||
Handlebars.TryEvaluate(text, model, out var result) &&
|
||||
result is not UndefinedBindingResult)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user