mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-28 09:30:07 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8e3ed10a9d
commit
7508af3d28
26
pwiki2.js
26
pwiki2.js
@ -21,9 +21,6 @@
|
||||
* - an async REPL???
|
||||
*
|
||||
*
|
||||
* XXX BUG: macro's join does not seem to work...
|
||||
*
|
||||
*
|
||||
*
|
||||
***********************************************************************
|
||||
*
|
||||
@ -1483,26 +1480,17 @@ object.Constructor('Page', BasePage, {
|
||||
}
|
||||
|
||||
var join_block = _getBlock('join')
|
||||
|
||||
// apply macro text...
|
||||
return Promise.iter(pages)
|
||||
.map(async function(page, i){
|
||||
//* XXX really ugly...
|
||||
var res = []
|
||||
for await (var c of that.__parser__.expand(page, text, state)){
|
||||
res.push(c) }
|
||||
if(join_block && i < pages.length-1){
|
||||
for await (var c of that.__parser__.expand(page, join_block, state)){
|
||||
res.push(c) } }
|
||||
return res
|
||||
/*/
|
||||
return pages
|
||||
.map(function(page, i){
|
||||
return [
|
||||
...await that.__parser__.expand(page, text, state),
|
||||
that.__parser__.expand(page, text, state),
|
||||
// weave in the join block...
|
||||
...((join_block && i < pages.length-1) ?
|
||||
await that.__parser__.expand(page, join_block, state)
|
||||
[that.__parser__.expand(that, join_block, state)]
|
||||
: []),
|
||||
]
|
||||
//*/
|
||||
})
|
||||
] })
|
||||
.flat() } }),
|
||||
|
||||
// nesting rules...
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user