From 3d3b76d9142dc611b9e4a727f4efa16b40c18832 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 16 Feb 2023 14:17:45 +0300 Subject: [PATCH] tweaks... Signed-off-by: Alex A. Naanou --- pwiki/page.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pwiki/page.js b/pwiki/page.js index e7da2e0..41ce4ca 100755 --- a/pwiki/page.js +++ b/pwiki/page.js @@ -1027,8 +1027,21 @@ object.Constructor('Page', BasePage, { // escapes it from parsing... : [body] + return function(state){ + // XXX can we loose stuff from state this way??? + // ...at this stage it should more or less be static -- check! + return Promise.awaitOrRun( + this.__parser__.parse(this, ast, { + ...state, + filters: local.includes(this.ISOLATED_FILTERS) ? + local + : [...outer, ...local], + }), + function(res){ + return {data: res} }) } + /*/ // XXX ASYNC... return async function(state){ - // XXX can we lose stuff from state this way??? + // XXX can we loose stuff from state this way??? // ...at this stage it should more or less be static -- check! var res = await this.__parser__.parse(this, ast, { @@ -1038,6 +1051,7 @@ object.Constructor('Page', BasePage, { : [...outer, ...local], }) return {data: res} } + //*/ // global filters... } else {