What
When the template contains a double backslash. The result only contains a single backslash.
Reproduction
To reproduce I wrote the following unit test:
[TestMethod]
public void Compile_WithDoubleBackslashes_ReturnsExpectedString()
{
string template = @"\\";
var compiledTemplate = Handlebars.Compile(template);
string result = compiledTemplate(null);
Assert.AreEqual(@"\\", result);
}
It fails with message:
Assert.AreEqual failed. Expected:<\\>. Actual:<\>.
Here I would expect that the result string contains the double backslash.
Workaround
To workaround this issue I can change the template to string template = @"\\\\".