mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-27 05:01:57 +00:00
some fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c7daa906db
commit
b711a2937e
@ -675,12 +675,12 @@ object.Constructor('Page', BasePage, {
|
||||
var outer_filters = state.filters
|
||||
state.filters = this.__parser__.normalizeFilters(filters)
|
||||
var res =
|
||||
this.parse(ast, state)
|
||||
await this.parse(ast, state)
|
||||
.iter()
|
||||
.flat()
|
||||
.join('')
|
||||
state.filters = outer_filters
|
||||
return { data: await res } } } },
|
||||
return { data: res } } } },
|
||||
//
|
||||
// @include(<path>)
|
||||
//
|
||||
|
||||
@ -461,12 +461,13 @@ module.BaseParser = {
|
||||
|
||||
// NOTE: we need to await for ast here as we need stage 2 of
|
||||
// parsing to happen AFTER everything else completes...
|
||||
return (await ast)
|
||||
// post handlers...
|
||||
.map(function(section){
|
||||
return typeof(section) == 'function' ?
|
||||
section.call(page, state)
|
||||
: section })
|
||||
return await Promise.iter((await ast)
|
||||
// post handlers...
|
||||
.map(function(section){
|
||||
return typeof(section) == 'function' ?
|
||||
// NOTE: this can produce promises...
|
||||
section.call(page, state)
|
||||
: section }))
|
||||
.flat()
|
||||
// filters...
|
||||
// XXX if one of the post-handlers is a promise this will
|
||||
|
||||
@ -71,6 +71,14 @@ pwiki.pwiki
|
||||
Included quoted text:
|
||||
---
|
||||
<quote src="/test/slots"/>
|
||||
---
|
||||
|
||||
Quote filters:
|
||||
---
|
||||
<quote filter="test">
|
||||
test filters...
|
||||
</quote>
|
||||
---
|
||||
`,
|
||||
})
|
||||
.update({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user