mirror of
https://github.com/flynx/pWiki.git
synced 2026-07-15 12:57:19 +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...
|
// content handler...
|
||||||
handler ??=
|
handler ??=
|
||||||
function(page, body, path, text, state){
|
function(page, body, path, text, state){
|
||||||
// check for recursion...
|
// handle recursion...
|
||||||
// XXX for some reason this does not work for async...
|
// XXX for some reason this does not work for async...
|
||||||
// ...and works quite differently in tests and
|
// ...and works quite differently in tests and
|
||||||
// in console -- returns [object Object] in the
|
// in console -- returns [object Object] in the
|
||||||
@ -1327,21 +1327,21 @@ module.parser = {
|
|||||||
|
|
||||||
// XXX check cache???
|
// 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(
|
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.at(-1) == src
|
||||||
&& state.include_stack.pop()
|
&& state.include_stack.pop()
|
||||||
// cleanup...
|
// cleanup...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user