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

View File

@ -24,7 +24,6 @@
* This will not:
* await pwiki.parse('<macro src="../tags" join=", ">@source(.)</macro>')
* 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
* (see: pwiki2.html) or via the base templates (see: pwiki/page.js:_view
* template)???