kainjow/Mustache

Parser chokes on open tags without close

derekbsnider opened this issue · 4 comments

If the template contains dangling open tags, there will be no output (note, this works with https://github.com/no1msd/mstch).

Example:

int main()
{
    mustache tmpl{"Hello {{what}}! {{"};

    std::cout << "Rendered: " << tmpl.render({"what", "there"}) << std::endl;

    return 0;
}

Output:
Rendered:

Expected:
Rendered: Hello there! {{

Did you check is_valid() and error_message()?

I was expecting this implementation to work the same as the original.

There are multiple implementations. I don’t think any can be classified as “original.”

On https://mustache.github.io/ C++ links to https://github.com/no1msd/mstch, so I was considering it the original.