diff --git a/pwiki/parser.js b/pwiki/parser.js index f2e3911..45c0fb2 100755 --- a/pwiki/parser.js +++ b/pwiki/parser.js @@ -436,7 +436,10 @@ module.BaseParser = { // XXX macros: we are mixing up ast state and parse state... // one should only be used for parsing and be forgotten after // the ast is constructed the other should be part of the ast... - // XXX ASYNC this does not yet work as a replacement for .expand(..), not sure why... + // XXX ASYNC this does not yet work as a replacement for .expand(..), + // not sure why... + // ...either we are mis-syncing somewhere or there is some broken + // data flow -- need to check the whole call stack to make sure... _expand: function(page, ast, state={}){ var that = this ast = ast == null ? @@ -456,7 +459,7 @@ module.BaseParser = { // state per macro call that is both containing all the state // from previous macros, and is not affected by the changes // done by next macros (unless needed)... - return Promise.iter(ast, + return Promise.seqiter(ast, function(value){ // text block... if(typeof(value) == 'string'){