mirror of
https://github.com/flynx/pWiki.git
synced 2026-08-24 08:16:43 +00:00
minor fix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
5c2a7ca7d1
commit
382c3f4350
@ -1371,15 +1371,16 @@ module.parser = {
|
|||||||
// get and run things...
|
// get and run things...
|
||||||
return Promise.awaitOrRun(
|
return Promise.awaitOrRun(
|
||||||
page.get(src).matched,
|
page.get(src).matched,
|
||||||
// XXX push this to a later stage -- we might not even need it...
|
|
||||||
page.get(src).raw,
|
|
||||||
function(paths, texts){
|
function(paths, texts){
|
||||||
paths = paths instanceof Array ?
|
texts =
|
||||||
paths
|
// special case: list page...
|
||||||
: [paths]
|
paths.length == 1
|
||||||
texts = texts instanceof Array ?
|
&& texts instanceof Array ?
|
||||||
texts
|
[texts]
|
||||||
|
: texts instanceof Array ?
|
||||||
|
texts
|
||||||
: [texts]
|
: [texts]
|
||||||
|
|
||||||
return Promise.awaitOrRun(
|
return Promise.awaitOrRun(
|
||||||
// handle pages...
|
// handle pages...
|
||||||
Promise
|
Promise
|
||||||
|
|||||||
@ -87,7 +87,11 @@ module.exports.P = {
|
|||||||
|
|
||||||
return res.length == 1 ?
|
return res.length == 1 ?
|
||||||
res[0]
|
res[0]
|
||||||
: res },
|
// if at least one page is a promise wait for all...
|
||||||
|
: Promise
|
||||||
|
.iter(res)
|
||||||
|
.sync() },
|
||||||
|
// res },
|
||||||
|
|
||||||
// XXX should this return an arrya for a multi-match???
|
// XXX should this return an arrya for a multi-match???
|
||||||
get text(){
|
get text(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user