Adding debug:true to the Eta constructor causes crashes.
templates/mypage.eta template page:
--- start of mypage.eta ---
<%~
/* According to 'merge' principle in the documentation, header.eta should receive it.lang and it.name */
include('header.eta',{name:'Ben'}); %>
--- end of mypage.eta ---
which uses the header templates/header.eta partial:
--header.eta
<html lang="<%~ it?.lang%>">
hi I am a header
<tag lang="<%~ JSON.stringify(it) %>">
--end header.eta
And we execute it using a simple script test.js:
import { Eta } from "https://deno.land/x/eta@v3.1.0/src/index.ts";
// WORKS:
const etaDebugFalse = new Eta({ views: Deno.cwd() + '/templates' });
// CAUSES A CRASH IN eta.render()
const etaDebugTrue = new Eta({ views: Deno.cwd() + '/templates', debug:true });
console.log( etaDebugFalse.render("mypage.eta", { lang: "en" }) );
console.log( etaDebugTrue.render("mypage.eta", { lang: "en" }) );
Adding debug:true to the Eta constructor causes crashes.
templates/mypage.eta
template page:which uses the header
templates/header.eta
partial:And we execute it using a simple script
test.js
:Originally posted by @morandd in https://github.com/eta-dev/eta/issues/254#issuecomment-1680389686