From 9f8e04d79f3cc7d62fd9fdfab710f262b5a37a5a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 20 Sep 2022 11:09:49 +0300 Subject: [PATCH 1/2] notes... Signed-off-by: Alex A. Naanou --- pwiki2.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pwiki2.js b/pwiki2.js index 453683d..86a4192 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -11,6 +11,9 @@ * ...and need this to work through all the i/o... * ....this might be an argument towards the .title attr, at least * for notes... +* XXX macros: should we add the pattern path to .depends instead of the +* final path... +* ...would also need a fast way to pattern match... * XXX need basic system events: * .onUpdate(path, data?) * .onCreate(path, data?) From 7a9579a397fcf0d48b6bee351c606b45a3404631 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 20 Sep 2022 11:19:31 +0300 Subject: [PATCH 2/2] added patterns to .depends Signed-off-by: Alex A. Naanou --- pwiki/page.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pwiki/page.js b/pwiki/page.js index c88ae2a..a589e2c 100755 --- a/pwiki/page.js +++ b/pwiki/page.js @@ -911,6 +911,8 @@ object.Constructor('Page', BasePage, { var depends = state.depends = state.depends ?? new Set() + // XXX DEPENDS_PATTERN + depends.add(src) handler = handler ?? async function(src, state){ @@ -1030,6 +1032,8 @@ object.Constructor('Page', BasePage, { var depends = state.depends = state.depends ?? new Set() + // XXX DEPENDS_PATTERN + depends.add(src) var pages = src ? (!expandactions @@ -1286,6 +1290,8 @@ object.Constructor('Page', BasePage, { && this.actions_inherit_args.has(pwpath.basename(src)) && this.get(pwpath.dirname(src)).path == this.path){ src += ':$ARGS' } + // XXX DEPENDS_PATTERN + depends.add(src) join = _getBlock('join') ?? join