softmoth / raku-Template-Mustache

Raku library for the Mustache template format
https://modules.raku.org/dist/Template::Mustache:cpan:SOFTMOTH
Artistic License 2.0
21 stars 19 forks source link

The digit 0 doesn't print #25

Closed scmorrison closed 5 years ago

scmorrison commented 5 years ago

Hi @softmoth,

Context variables with an assigned value of the number 0 render blank:

use Template::Mustache;

Template::Mustache.render('Zero: "{{ zero }}"', { zero => 0 }).say; # Zero: ""
Template::Mustache.render('One: "{{ one }}"', { one => 1 }).say;   # One: "1"

The string '0' prints fine.

Thanks, Sam

scmorrison commented 5 years ago

Thanks!