mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 18:10:09 +00:00
notes and minor tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
becd426cde
commit
f31a040db5
@ -1582,11 +1582,15 @@ 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(
|
||||||
['name', 'src', 'sort', 'text', 'join', 'else',
|
['name', 'src', 'sort', 'text', 'join', 'else',
|
||||||
['strict', 'isolated', 'inheritmacros', 'inheritvars' ]],
|
['strict', 'isolated', 'inheritmacros', 'inheritvars']],
|
||||||
async function*(args, body, state){
|
async function*(args, body, state){
|
||||||
var that = this
|
var that = this
|
||||||
|
|
||||||
@ -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
|
||||||
|
// .parser(<state>)
|
||||||
|
if(arguments.length == 1
|
||||||
|
&& text instanceof Object
|
||||||
|
&& !(text instanceof Array)){
|
||||||
|
state = text
|
||||||
|
text = null }
|
||||||
return Promise.awaitOrRun(
|
return Promise.awaitOrRun(
|
||||||
text,
|
//text,
|
||||||
|
text
|
||||||
|
?? this.raw,
|
||||||
function(text){
|
function(text){
|
||||||
// .parser(<state>)
|
|
||||||
if(arguments.length == 1
|
|
||||||
&& text instanceof Object
|
|
||||||
&& !(text instanceof Array)){
|
|
||||||
state = text
|
|
||||||
text = null }
|
|
||||||
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...
|
||||||
@ -1889,7 +1896,7 @@ object.Constructor('Page', BasePage, {
|
|||||||
renderer: state.renderer,
|
renderer: state.renderer,
|
||||||
args: that.args,
|
args: that.args,
|
||||||
}),
|
}),
|
||||||
text,
|
text,
|
||||||
state) }) },
|
state) }) },
|
||||||
|
|
||||||
// raw page text...
|
// raw page text...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user