diff --git a/v3/pwiki/parser.js b/v3/pwiki/parser.js
index 5ae6bd8..9f794aa 100644
--- a/v3/pwiki/parser.js
+++ b/v3/pwiki/parser.js
@@ -1321,7 +1321,7 @@ module.parser = {
: name in slots)
// set slot value...
- // XXX simplify this...
+ /* XXX CONTENT...
var stack = []
slots[name]
&& stack.push(slots[name])
@@ -1357,6 +1357,17 @@ module.parser = {
.filter(function(e){
return typeof(e) != 'function'
|| e.slot != name }) ) }
+ /*/
+ text = text ?
+ parser.expand(this, text ?? [], state)
+ : text
+ if(body && text){
+ var slot = text
+ } else {
+ var slot = body ?? text }
+ var original = slot
+ slots[name] = slot
+ //*/
return hidden ?
''
: Object.assign(
@@ -1364,7 +1375,8 @@ module.parser = {
return ((st ?? state).slots ?? {})[name]
?? original },
{slot: name}) }) }),
- 'content': ['slot'],
+ // XXX CONTENT...
+ //'content': ['slot'],
//
diff --git a/v3/pwiki/test/parser.js b/v3/pwiki/test/parser.js
index e016a86..7c6ebd7 100755
--- a/v3/pwiki/test/parser.js
+++ b/v3/pwiki/test/parser.js
@@ -54,6 +54,7 @@ test.Setups({
...ins.map(function(e){
return e + 'third' }),
'third' ] },
+ /* XXX CONTENT...
slot_content_empty: function(assert){
return [
'@slot(slot body="[[ ]]")',
@@ -71,7 +72,9 @@ test.Setups({
...ins.map(function(i){
return i +'@slot(slot value)' }),
expect.replace('default', 'value') ] },
+ //*/
+ // XXX these are an alternative to ...
slot_nested: function(assert){
return [
'[[ ]]@slot(slot.content value)',
@@ -81,6 +84,7 @@ test.Setups({
'[[ ]]@slot(slot value)',
'value' ] },
+ /* XXX CONTENT...
// XXX the question with the next tow is:
// should body override or nest?
// ...both are logical but in either case the result should be
@@ -146,6 +150,7 @@ test.Setups({
...ins.map(function(i){
return i +'@slot(slot shown)' }),
'' ] },
+ //*/
})