From 7a86d47230bdd8926aec7adc524c6f9d56e42b91 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 2 Dec 2022 03:19:16 +0300 Subject: [PATCH] bugfix... Signed-off-by: Alex A. Naanou --- pwiki/page.js | 17 +++++++++++------ pwiki2.js | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pwiki/page.js b/pwiki/page.js index 4334288..330ae39 100755 --- a/pwiki/page.js +++ b/pwiki/page.js @@ -1673,6 +1673,7 @@ object.Constructor('Page', BasePage, { '!': true, // XXX EXPERIMENTAL... quote: true, + 'quote!': true, }, // XXX should this be .raw or .parse()??? @@ -1684,12 +1685,16 @@ object.Constructor('Page', BasePage, { // XXX this is html/web specific, should it be here??? // ... // XXX should this be .raw or .parse()??? - quote: function(){ - return this.get('..:$ARGS').raw//parse() + quote: async function(energetic=false){ + return this.get('..:$ARGS', {energetic: await this.energetic}).raw//parse() .then(function(res){ return res instanceof Array ? res.map(pwpath.quoteHTML) : pwpath.quoteHTML(res) }) }, + 'quote!': Object.assign( + function(){ + return this.quote(true) }, + {energetic: true}), // events... @@ -2182,7 +2187,7 @@ module.System = { - [@source(./location/!/quote)] + [@source(./location/quote/!)] @@ -2196,7 +2201,7 @@ module.System = { -

@source(./title/!/quote)

+

@source(./title/quote/!)

@include(.:$ARGS join="@source(file-separator)" recursive="")
` }, @@ -2228,7 +2233,7 @@ module.System = { /*/ _edit: { text: - '@source(./path/!/quote)' + '@source(./path/quote/!)' +'
' +'' +'

@source(../title) (edit) ../.. - @source(../location/!/quote) + @source(../location/quote/!) diff --git a/pwiki2.js b/pwiki2.js index 8c7fffb..dbd8815 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -38,6 +38,7 @@ * * * +* XXX BUG: for some reason editing the root page ('/') hangs /tree... * XXX .parse(..): should we handle pattern paths and lists of text??? * XXX parser: error handling: add line number + context... (???) * XXX BUG: parser: @@ -438,6 +439,8 @@ * * * XXX DOC: +* - .../quote/! is not the same as .../!/quote +* this is because actions are called right to left... * - macro isolation in relation to slots... * - paths in pWiki behave a bit differently than traditional * file-system paths, this is due to one key distinction: