mirror of
https://github.com/flynx/pWiki.git
synced 2026-07-13 20:10:57 +00:00
tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
9341e45346
commit
18daeb27ff
@ -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,21 +1327,21 @@ module.parser = {
|
||||
|
||||
// XXX check cache???
|
||||
|
||||
var res = args.isolated ?
|
||||
this.resolve(
|
||||
page,
|
||||
text,
|
||||
Object.assign(
|
||||
args.isolated == 'partial' ?
|
||||
serialize.partialDeepCopy(state)
|
||||
: {},
|
||||
{include_stack}))
|
||||
: this.expand(page, text, state)
|
||||
|
||||
// handle recursion...
|
||||
return Promise.awaitOrRun(
|
||||
res,
|
||||
function(){
|
||||
|
||||
args.isolated ?
|
||||
this.resolve(
|
||||
page,
|
||||
text,
|
||||
Object.assign(
|
||||
args.isolated == 'partial' ?
|
||||
serialize.partialDeepCopy(state)
|
||||
: {},
|
||||
{include_stack}))
|
||||
: this.expand(page, text, state),
|
||||
|
||||
function(res){
|
||||
// handle recursion...
|
||||
state.include_stack.at(-1) == src
|
||||
&& state.include_stack.pop()
|
||||
// cleanup...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user