tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2026-07-05 15:35:02 +03:00
parent 9341e45346
commit 18daeb27ff

View File

@ -1313,7 +1313,7 @@ module.parser = {
// content handler...
handler ??=
function(page, body, path, text, state){
// check for recursion...
// handle recursion...
// XXX for some reason this does not work for async...
// ...and works quite differently in tests and
// in console -- returns [object Object] in the
@ -1327,7 +1327,9 @@ module.parser = {
// XXX check cache???
var res = args.isolated ?
return Promise.awaitOrRun(
args.isolated ?
this.resolve(
page,
text,
@ -1336,12 +1338,10 @@ module.parser = {
serialize.partialDeepCopy(state)
: {},
{include_stack}))
: this.expand(page, text, state)
: this.expand(page, text, state),
function(res){
// handle recursion...
return Promise.awaitOrRun(
res,
function(){
state.include_stack.at(-1) == src
&& state.include_stack.pop()
// cleanup...