Skip to content

Render true and false tags in mustache templates #587

@queenstdev

Description

@queenstdev

Render a template with a boolean value e.g.:

auto t = crow::mustache::compile(R"---({{true_value}} and {{false_value}})---");
crow::mustache::context ctx;
ctx["true_value"] = true;
ctx["false_value"] = false;
auto result = t.render_string(ctx);
CHECK("true and false" == result);

results in a std::runtime_error "not implemented tag type..."

The expected boolean rendering can be seen in the Mustache demo page

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions