Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-08-09 11:15:37 +03:00
parent 7a1a89e904
commit 96b2a23421
2 changed files with 8 additions and 6 deletions

View File

@ -548,7 +548,9 @@ object.Constructor('Page', BasePage, {
return source
.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(){},
'quote-wikiword': function(){},

View File

@ -480,15 +480,15 @@ module.BaseParser = {
: state.filters ?
that.normalizeFilters(state.filters)
.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){
/* XXX
throw new Error(
'.parse(..): unsupported filter: '+ filter) }
/*/
console.warn(
'.parse(..): unsupported filter: '+ filter)
return res }
//*/
// NOTE: if a filter returns falsy then it
// will have no effect on the result...
return page.filters[filter].call(page, res)
?? res }, section)
// no global filters...