//
@@ -422,6 +423,7 @@ module.BaseParser = {
var {name, args, body} = value
// nested macro -- skip...
if(typeof(page.macros[name]) != 'function'){
+ yield {...value, skip: true}
continue }
var res =
@@ -451,10 +453,15 @@ module.BaseParser = {
e.call(page, state)
: e
+ // expand arrays...
if(e instanceof Array){
yield* this.resolve(page, e, state)
+ // data -- unwrap content...
} else if(e instanceof Object && 'data' in e){
yield { data: await this.resolve(page, e.data, state) }
+ // skipped items...
+ } else if(e instanceof Object && e.skip){
+ continue
} else {
yield e } } },
diff --git a/pwiki2-test.js b/pwiki2-test.js
index f383afa..362bd51 100755
--- a/pwiki2-test.js
+++ b/pwiki2-test.js
@@ -191,6 +191,22 @@ pwiki.pwiki
refilled
+
+
+ Content: A B C:
+ A
+ B
+ C
+
+ Nested content: A B C:
+
+ A
+
+ B
+
+ C
+
+
`, })
.update({
location: '/test/nesting',
diff --git a/pwiki2.js b/pwiki2.js
index 5638bb2..9863e2d 100755
--- a/pwiki2.js
+++ b/pwiki2.js
@@ -1,9 +1,9 @@
/**********************************************************************
*
*
-* XXX might be a good idea for slots to support getting previous slot
-* content, e.g.:
-* new text
+* XXX slot does not work in nested slots...
+* XXX ranges in pattern paths...
+* ...url syntax???
* XXX BUG?: markdown: when parsing chunks each chunk gets an open/closed
* inserted at start/end -- this breaks stuff returned by macros...
* ...there are two ways to dance around this:
@@ -43,7 +43,7 @@
* - zip (json/tree) --
* - page actions
* - delete -- DONE
-* - copy/move --
+* - copy/move -- DONE
* - migrate bootstrap --
* - store topology --
* - sync and sync conf --