mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-30 18:40:08 +00:00
minor tweaks and notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
c046402ee4
commit
66e1e310fa
@ -79,6 +79,7 @@ module.pWikiPath = {
|
|||||||
parent = this.normalize(parent, 'array')
|
parent = this.normalize(parent, 'array')
|
||||||
return this.normalize(parent.concat(path), format) },
|
return this.normalize(parent.concat(path), format) },
|
||||||
|
|
||||||
|
//paths: function*(path='/', leading_slash=true){
|
||||||
paths: function*(path='/'){
|
paths: function*(path='/'){
|
||||||
path = this.normalize(path, 'array')
|
path = this.normalize(path, 'array')
|
||||||
// handle '', '.', and '/' paths...
|
// handle '', '.', and '/' paths...
|
||||||
@ -101,6 +102,9 @@ module.pWikiPath = {
|
|||||||
var p = path.slice()
|
var p = path.slice()
|
||||||
while(p.length > 0){
|
while(p.length > 0){
|
||||||
yield this.relative(p, tpl +'/'+ page, 'string')
|
yield this.relative(p, tpl +'/'+ page, 'string')
|
||||||
|
//yield leading_slash ?
|
||||||
|
// this.relative(p, tpl +'/'+ page, 'string')
|
||||||
|
// : this.relative(p, tpl +'/'+ page, 'string').slice(1)
|
||||||
// special case: non-relative template/page path...
|
// special case: non-relative template/page path...
|
||||||
if(tpl[0] == '/'){
|
if(tpl[0] == '/'){
|
||||||
break }
|
break }
|
||||||
@ -113,6 +117,7 @@ module.pWikiPath = {
|
|||||||
|
|
||||||
// NOTE: store keys must be normalized...
|
// NOTE: store keys must be normalized...
|
||||||
//
|
//
|
||||||
|
// XXX should this be strict about leading '/' in paths???
|
||||||
// XXX must support store stacks...
|
// XXX must support store stacks...
|
||||||
// XXX path macros???
|
// XXX path macros???
|
||||||
// XXX should we support page symlinking???
|
// XXX should we support page symlinking???
|
||||||
@ -133,6 +138,7 @@ module.store = {
|
|||||||
|
|
||||||
// XXX BUG: '/a*/' does not match '/a/b/...' -- need to replace
|
// XXX BUG: '/a*/' does not match '/a/b/...' -- need to replace
|
||||||
// pattern + with * for partial patterns...
|
// pattern + with * for partial patterns...
|
||||||
|
// XXX BUG: '*' and '**' seem to produce identical results...
|
||||||
match: function(path){
|
match: function(path){
|
||||||
// pattern match * / **
|
// pattern match * / **
|
||||||
if(path.includes('*')
|
if(path.includes('*')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user