bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-05-25 01:15:05 +03:00
parent bdaf9cb5b5
commit 4c93757b4a

View File

@ -911,8 +911,13 @@ object.Constructor('BasePage', {
// XXX should this be an iterator??? // XXX should this be an iterator???
each: function(path){ each: function(path){
var that = this var that = this
path = path ?
module.path.relative(this.path, path)
: this.path
//var paths = this.match(path) //var paths = this.match(path)
var paths = this.resolve(path) var paths = path.includes('*') ?
this.resolve(path)
: path
paths = paths instanceof Array ? paths = paths instanceof Array ?
paths paths
: [paths] : [paths]
@ -1978,6 +1983,7 @@ object.Constructor('Page', BasePage, {
// apply macro text... // apply macro text...
return pages return pages
.map(function(page, i){ .map(function(page, i){
console.log('---', page.path)
return [ return [
...that.__parser__.expand(page, text, state), ...that.__parser__.expand(page, text, state),
...((join_block && i < pages.length-1) ? ...((join_block && i < pages.length-1) ?