mirror of
https://github.com/flynx/pWiki.git
synced 2026-01-07 18:41:09 +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
|
var outer_filters = state.filters
|
||||||
state.filters = this.__parser__.normalizeFilters(filters)
|
state.filters = this.__parser__.normalizeFilters(filters)
|
||||||
var res =
|
var res =
|
||||||
this.parse(ast, state)
|
await this.parse(ast, state)
|
||||||
.iter()
|
.iter()
|
||||||
.flat()
|
.flat()
|
||||||
.join('')
|
.join('')
|
||||||
state.filters = outer_filters
|
state.filters = outer_filters
|
||||||
return { data: await res } } } },
|
return { data: res } } } },
|
||||||
//
|
//
|
||||||
// @include(<path>)
|
// @include(<path>)
|
||||||
//
|
//
|
||||||
|
|||||||
@ -461,12 +461,13 @@ module.BaseParser = {
|
|||||||
|
|
||||||
// NOTE: we need to await for ast here as we need stage 2 of
|
// NOTE: we need to await for ast here as we need stage 2 of
|
||||||
// parsing to happen AFTER everything else completes...
|
// parsing to happen AFTER everything else completes...
|
||||||
return (await ast)
|
return await Promise.iter((await ast)
|
||||||
// post handlers...
|
// post handlers...
|
||||||
.map(function(section){
|
.map(function(section){
|
||||||
return typeof(section) == 'function' ?
|
return typeof(section) == 'function' ?
|
||||||
|
// NOTE: this can produce promises...
|
||||||
section.call(page, state)
|
section.call(page, state)
|
||||||
: section })
|
: section }))
|
||||||
.flat()
|
.flat()
|
||||||
// filters...
|
// filters...
|
||||||
// XXX if one of the post-handlers is a promise this will
|
// XXX if one of the post-handlers is a promise this will
|
||||||
|
|||||||
@ -71,6 +71,14 @@ pwiki.pwiki
|
|||||||
Included quoted text:
|
Included quoted text:
|
||||||
---
|
---
|
||||||
<quote src="/test/slots"/>
|
<quote src="/test/slots"/>
|
||||||
|
---
|
||||||
|
|
||||||
|
Quote filters:
|
||||||
|
---
|
||||||
|
<quote filter="test">
|
||||||
|
test filters...
|
||||||
|
</quote>
|
||||||
|
---
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
.update({
|
.update({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user