mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-10 18:56:50 +02:00
Fix HandlebarsContext ParseAndEvaluate method (#1213)
* Fix HandlebarsContext ParseAndEvaluate method * test * xxx
This commit is contained in:
@@ -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