mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-31 19:10:08 +00:00
notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7a1a89e904
commit
96b2a23421
@ -548,7 +548,9 @@ object.Constructor('Page', BasePage, {
|
|||||||
return source
|
return source
|
||||||
.replace(/test/g, 'TEST') },
|
.replace(/test/g, 'TEST') },
|
||||||
|
|
||||||
// XXX
|
// XXX one way to do this in a stable manner is to wrap the source
|
||||||
|
// in something like <span wikiwords=yes> .. </span> and only
|
||||||
|
// process those removing the wrapper in dom...
|
||||||
wikiword: function(){},
|
wikiword: function(){},
|
||||||
'quote-wikiword': function(){},
|
'quote-wikiword': function(){},
|
||||||
|
|
||||||
|
|||||||
@ -480,15 +480,15 @@ module.BaseParser = {
|
|||||||
: state.filters ?
|
: state.filters ?
|
||||||
that.normalizeFilters(state.filters)
|
that.normalizeFilters(state.filters)
|
||||||
.reduce(function(res, filter){
|
.reduce(function(res, filter){
|
||||||
|
// unknown filter...
|
||||||
|
// NOTE: we try not to break on user errors
|
||||||
|
// if we can help it...
|
||||||
if(page.filters[filter] == null){
|
if(page.filters[filter] == null){
|
||||||
/* XXX
|
|
||||||
throw new Error(
|
|
||||||
'.parse(..): unsupported filter: '+ filter) }
|
|
||||||
/*/
|
|
||||||
console.warn(
|
console.warn(
|
||||||
'.parse(..): unsupported filter: '+ filter)
|
'.parse(..): unsupported filter: '+ filter)
|
||||||
return res }
|
return res }
|
||||||
//*/
|
// NOTE: if a filter returns falsy then it
|
||||||
|
// will have no effect on the result...
|
||||||
return page.filters[filter].call(page, res)
|
return page.filters[filter].call(page, res)
|
||||||
?? res }, section)
|
?? res }, section)
|
||||||
// no global filters...
|
// no global filters...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user