Using Handlebars.Net, I'd like to create a HandlebarsHelper that will replace carriage returns and newlines with <br>
tags. It should look something like this:
string pattern = @"/(\r\n|\n|\r)/gm";
string replacement = "<br>";
Regex rgx = new Regex(pattern);
Handlebars.RegisterHelper("link_to", (string text) =>
{
text = rgx.Replace(text, replacement);
});
The compiler (or resharper) is telling me that it can't tell if I'm trying to use HandlebarsBlockHelper or HandlebarsHelper, and I'm missing arguments in either case.
- What's the difference between the two?
- I can't seem to find much documentation for any of this. Is there documentation for the above two mentioned objects as well as HelperOptions, and how to use TextWriter, the dymanic context and the argument object list?