mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-27 13:11:59 +00:00
more experimenting with macros...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2260f75e8c
commit
82be9f8709
11
index.html
11
index.html
@ -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
|
||||
})
|
||||
|
||||
3
wiki.js
3
wiki.js
@ -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>-> ['+ e[0] +']</i>')
|
||||
.sort()
|
||||
.join('<br>')
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user