notes and minor tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-02-19 14:27:50 +03:00
parent becd426cde
commit f31a040db5

View File

@ -1582,6 +1582,10 @@ object.Constructor('Page', BasePage, {
// that <store>.match(..) can not know about... // that <store>.match(..) can not know about...
// XXX should we do the same for offset??? // XXX should we do the same for offset???
// //
// XXX BUG: strict does not seem to work:
// @macro(src="./resolved-page" else="no" text="yes" strict)
// -> yes
// should be "no"
// XXX should macro:index be 0 or 1 (current) based??? // XXX should macro:index be 0 or 1 (current) based???
// XXX SORT sorting not implemented yet... // XXX SORT sorting not implemented yet...
macro: Macro( macro: Macro(
@ -1867,17 +1871,20 @@ object.Constructor('Page', BasePage, {
// and debugging, set comment it out to disable... // and debugging, set comment it out to disable...
//__debug_last_render_state: undefined, //__debug_last_render_state: undefined,
// XXX should this handle pattern paths??? // XXX should this handle pattern paths???
// XXX this might be a good spot to cache .raw in state...
parse: function(text, state){ parse: function(text, state){
var that = this var that = this
return Promise.awaitOrRun(
text,
function(text){
// .parser(<state>) // .parser(<state>)
if(arguments.length == 1 if(arguments.length == 1
&& text instanceof Object && text instanceof Object
&& !(text instanceof Array)){ && !(text instanceof Array)){
state = text state = text
text = null } text = null }
return Promise.awaitOrRun(
//text,
text
?? this.raw,
function(text){
state = state ?? {} state = state ?? {}
state.renderer = state.renderer ?? that state.renderer = state.renderer ?? that
// this is here for debugging and introspection... // this is here for debugging and introspection...