title: Handlebars.net: Reached end of template before block expression 'currency' was closed
body: <p>I have a template that looks like this:
  (I removed some elements of the table just to keep the code short)</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>              {{#each Tables}}
                &lt;div id='report-container'&gt;
                  &lt;table id='report-table'&gt;
                    &lt;tr class='header-row'&gt;
                      &lt;th style='width: 150px; max-width: 150px !important;'&gt;{{this.Title}}&lt;/th&gt;
                      &lt;th&gt;Total Company Net Sales $&lt;/th&gt;
                      ...
                    &lt;/tr&gt;
      
                    {{#each this.Data}}   
                    &lt;tr&gt;
                      &lt;td&gt;{{RowTitle}}&lt;/td&gt;
                      &lt;td&gt;{{currency TotalCompanyNetSales}}&lt;/td&gt;
                      ...
                    &lt;/tr&gt;
                    {{/each}}
  
                  &lt;/table&gt;
                &lt;/div&gt;
                {{/each}}</code></pre>
  </div>
  </div>
  </p>
  <p>With a helper:</p>
  <pre><code>        handleBars.RegisterHelper(&quot;currency&quot;, (writer, context, parameters) =&gt;
          {
              var value = decimal.Parse(parameters[0].ToString());
              value /= 1000;
              var result = value.ToString(&quot;0,-28:C2&quot;);
              return result;
          });
  </code></pre>
  <p>Im not sure if the object itself is relevant but I can post if necessary. The problem is just with the helper. When I try to compile the template I get the following error message:</p>
  <p>&quot;Reached end of template before block expression 'currency' was closed&quot;</p>
  <p>If I remove the currency helper the value displays fine. It never even calls the currency function. Any idea what I am doing wrong here?</p>