diff --git a/v3/pwiki/parser.js b/v3/pwiki/parser.js index 1a81248..45a5349 100644 --- a/v3/pwiki/parser.js +++ b/v3/pwiki/parser.js @@ -1048,9 +1048,6 @@ module.parser = { // // | - // - // XXX BUG why is the 2nd filter a promise???? - // 'aaa moo bbb' - // -> error in .finalize(..)??? // XXX should we include the global filters (current) or exclude // them by default??? // XXX BUG: async body breaks nested filters... @@ -1083,7 +1080,6 @@ module.parser = { // stage III return function(state){ return Promise.awaitOrRun( - // apply the filters... that.finalize( page, @@ -1094,7 +1090,6 @@ module.parser = { filters : [...filters, ...state.filters ?? []], }), - function(body){ // stage III post... // NOTE: we are protecting the result from diff --git a/v3/pwiki/test/parser.js b/v3/pwiki/test/parser.js index 74bdd20..01caa00 100755 --- a/v3/pwiki/test/parser.js +++ b/v3/pwiki/test/parser.js @@ -399,7 +399,55 @@ test.Setups({ // XXX // XXX filter... - // XXX + filter_local: function(assert){ + return { + page: P, + code: [ + 'moo', + 'MOO' ]} }, + filter_local_sync: function(assert){ + return { + page: P, + code: [ + '@include(/page)', + 'PAGE' ]} }, + filter_local_async: function(assert){ + return { + page: P, + code: [ + '@include(/async/page)', + 'PAGE' ]} }, + filter_global: function(assert){ + return { + page: P, + code: [ + 'moo', + 'MOO' ]} }, + filter_global_sync: function(assert){ + return { + page: P, + code: [ + '@include(/page)', + 'PAGE' ]} }, + filter_global_async: function(assert){ + return { + page: P, + code: [ + '@include(/async/page)', + 'PAGE' ]} }, + filter_mixed_isolated_sync: function(assert){ + return { + page: P, + code: [ + 'local @include(/page)', + 'LOCAL Page' ]} }, + // XXX BUG + filter_mixed_isolated_async: function(assert){ + return { + page: P, + code: [ + 'local @include(/async/page)', + 'LOCAL Page' ]} }, })