more experimenting with macros...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-07-10 03:29:53 +03:00
parent 2260f75e8c
commit 82be9f8709
2 changed files with 14 additions and 0 deletions

View File

@ -44,6 +44,12 @@ var reload = () => {
return w.text
}
if(macro == 'attr'
&& args.length == 1
&& ['title', 'path', 'location', 'dir'].indexOf(args[0]) >= 0){
return Wiki[args[0]]
}
return _
})
// html-like macro syntax...
@ -66,6 +72,11 @@ var reload = () => {
return w.text
}
if(macro == 'attr'
&& args.name != null
&& ['title', 'path', 'location', 'dir'].indexOf(args.name) >= 0){
return Wiki[args.name]
}
return t
})

View File

@ -22,6 +22,7 @@ var BaseData = {
return null
})
.filter(e => e != null)
.sort()
.map(e => '['+ e +']')
.join('<br>')
},
@ -36,6 +37,7 @@ var BaseData = {
return null
})
.filter(e => e != null)
.sort()
.map(e => '['+ e +']')
.join('<br>')
},
@ -57,6 +59,7 @@ var BaseData = {
return res
//.map(e => '['+ e[0] +'] <i>from page: ['+ e[1] +']</i>')
.map(e => '['+ e[1] +'] <i>-&gt; ['+ e[0] +']</i>')
.sort()
.join('<br>')
},