maciejhirsz / ramhorns

Fast Mustache template engine implementation in pure Rust.
https://crates.io/crates/ramhorns
Mozilla Public License 2.0
297 stars 29 forks source link

Recursive partials cause stack overflow #52

Open JakeShirley opened 3 years ago

JakeShirley commented 3 years ago

Example mustache:

test1.mustache

This is a test: {{> test2.mustache}}

test2.mustache

{{#value}}{{> test2.mustache}}{{/value}}{{^value}}Base case{{/value}}

This causes:

thread 'main' has overflowed its stack

maciejhirsz commented 3 years ago

Good catch!