mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-22 19:11:39 +00:00
minor tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
33ae0c690d
commit
08844b8ae0
20
pwiki2.js
20
pwiki2.js
@ -684,20 +684,28 @@ object.Constructor('Page', BasePage, {
|
|||||||
//NO_FILTERS: 'nofilters',
|
//NO_FILTERS: 'nofilters',
|
||||||
ISOLATED_FILTERS: 'isolated',
|
ISOLATED_FILTERS: 'isolated',
|
||||||
|
|
||||||
|
//
|
||||||
|
// <filter>(<source>)
|
||||||
|
// -> <result>
|
||||||
|
// -> undefined
|
||||||
|
//
|
||||||
// XXX might be a good idea to fix filter order...
|
// XXX might be a good idea to fix filter order...
|
||||||
filters: {
|
filters: {
|
||||||
// if this is used all other filters will be skipped (placeholder)
|
// placeholders...
|
||||||
nofilters: function(source){ return source },
|
nofilters: function(){},
|
||||||
isolated: function(source){ return source },
|
isolated: function(){},
|
||||||
|
|
||||||
// XXX move to docs...
|
// XXX TESTING...
|
||||||
|
dummy: function(){},
|
||||||
test: function(source){
|
test: function(source){
|
||||||
return source
|
return source
|
||||||
.replace(/ test /g, ' TEST ') },
|
.replace(/ test /g, ' TEST ') },
|
||||||
|
|
||||||
wikiword: function(source){
|
wikiword: function(source){
|
||||||
|
// XXX
|
||||||
return source },
|
return source },
|
||||||
markdown: function(source){
|
markdown: function(source){
|
||||||
|
// XXX
|
||||||
return source },
|
return source },
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -853,11 +861,13 @@ object.Constructor('Page', BasePage, {
|
|||||||
if(that.filters[filter] == null){
|
if(that.filters[filter] == null){
|
||||||
throw new Error(
|
throw new Error(
|
||||||
'.postProcess(..): unsupported filter: '+ filter) }
|
'.postProcess(..): unsupported filter: '+ filter) }
|
||||||
return that.filters[filter].call(that, res) }, section)
|
return that.filters[filter].call(that, res)
|
||||||
|
?? res }, section)
|
||||||
: section } })
|
: section } })
|
||||||
.flat()
|
.flat()
|
||||||
.join('') },
|
.join('') },
|
||||||
|
|
||||||
|
// XXX do we need boht this and .postProcess(..) ???
|
||||||
render: function(state={}){
|
render: function(state={}){
|
||||||
return this.postProcess(null, state) },
|
return this.postProcess(null, state) },
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user