reasonable defaults for macros...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-10-30 16:57:27 +03:00
parent 0002b1336c
commit e3b104f9cc
2 changed files with 1 additions and 4 deletions

View File

@ -1400,12 +1400,11 @@ object.Constructor('Page', BasePage, {
args.isolated args.isolated
: iargs.isolated) : iargs.isolated)
?? true ?? true
// XXX INHERITMACROS EXPERIMENTAL
var inheritmacros = var inheritmacros =
('inheritmacros' in args ? ('inheritmacros' in args ?
args.inheritmacros args.inheritmacros
: iargs.inheritmacros) : iargs.inheritmacros)
?? false ?? true
if(src){ if(src){
src = await base.parse(src, state) src = await base.parse(src, state)
@ -1442,7 +1441,6 @@ object.Constructor('Page', BasePage, {
seen: state.seen, seen: state.seen,
depends, depends,
renderer: state.renderer, renderer: state.renderer,
// XXX INHERITMACROS EXPERIMENTAL
macros: args.inheritmacros ? macros: args.inheritmacros ?
{__proto__: macros} {__proto__: macros}
: {}, : {},

View File

@ -24,7 +24,6 @@
* This will not: * This will not:
* await pwiki.parse('<macro src="../tags" join=", ">@source(.)</macro>') * await pwiki.parse('<macro src="../tags" join=", ">@source(.)</macro>')
* XXX Q: do we need a way to index a list item via path??? * XXX Q: do we need a way to index a list item via path???
* XXX macro: should inheritmacros be true or false (current) by default???
* XXX STYLE: should style loading be done via the event mechanics * XXX STYLE: should style loading be done via the event mechanics
* (see: pwiki2.html) or via the base templates (see: pwiki/page.js:_view * (see: pwiki2.html) or via the base templates (see: pwiki/page.js:_view
* template)??? * template)???