diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-06 21:17:25 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-02-06 21:17:25 +0000 |
commit | 58141a0ebcdf3313a83af712b83f8acd1c08aa3b (patch) | |
tree | 03deba83be19c00ed111eea7b23f208eba69ba4f /doc/todo | |
parent | 46f0f5bdc23139f0a382e608904c2acc8a774e73 (diff) | |
download | ikiwiki-58141a0ebcdf3313a83af712b83f8acd1c08aa3b.tar ikiwiki-58141a0ebcdf3313a83af712b83f8acd1c08aa3b.tar.gz |
* Patch based on a patch from Ethan to support relative matching in
PageSpecs, by using "./". pagespec_match() has grown a new third parameter
to support this.
Diffstat (limited to 'doc/todo')
-rw-r--r-- | doc/todo/pagespec_expansions.mdwn | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/doc/todo/pagespec_expansions.mdwn b/doc/todo/pagespec_expansions.mdwn index 74fe9c13c..111217948 100644 --- a/doc/todo/pagespec_expansions.mdwn +++ b/doc/todo/pagespec_expansions.mdwn @@ -40,12 +40,31 @@ now that I was mistaken.. "four or fewer levels deep" would be "@ or @/@ or @/@/@ or @/@/@/@". Well, I think it has a certain appeal but I can see why it might not be much of an improvement. :) --Ethan -> OK, I took a shot at implementing the changes. I was thinking about making -> pagespecs relative by default but I couldn't decide whether page -> `foo/bar` inlining `*` should match `foo/bar/*` or `foo/*`. -> So I punted and left things as absolute, with `./*` matching -> `foo/bar/*`, which I think is pretty clear. -> The patch is at [ikidev](http://ikidev.betacantrips.com/patches/pagespec_enhancements.patch) -> and you can see it work at -> [this page](http://ikidev.betacantrips.com/one/two/three/index.html) or -> [this page](http://ikidev.betacantrips.com/one/two/three/princess.html) --Ethan
\ No newline at end of file +> Seems to me that ".." would be the natural thing to use, not "@". --[[Joey]] + +OK, I took a shot at implementing the changes. I was thinking about making +pagespecs relative by default but I couldn't decide whether page +`foo/bar` inlining `*` should match `foo/bar/*` or `foo/*`. +So I punted and left things as absolute, with `./*` matching +`foo/bar/*`, which I think is pretty clear. +The patch is at [ikidev](http://ikidev.betacantrips.com/patches/pagespec_enhancements.patch) +and you can see it work at +[this page](http://ikidev.betacantrips.com/one/two/three/index.html) or +[this page](http://ikidev.betacantrips.com/one/two/three/princess.html) --Ethan + +> Nice patch, though I see the following problems with it: +> * The sole pagespec_match in IkiWiki::Render probably should have `$p` +> as its third parameter. This will allow add_depends to add a +> dependency on a pagespec that matches relative to the page. I made this +> changes and it seems to work, new pages are noticed in updates. +> * `! $from` fails to match pages named "0" :-) +> * '/./ matches any letter, not just "." :-) :-) +> * One other major problem. If you look at the doc/examples/blog/index.mdwn +> I changed it to use relative globs like "./posts/*", but they didn't work, +> because it looked for examples/blog/indexposts/* instead of +> examples/blog/index/posts/*. And, of course, what I really expected it to +> look for was examples/blog/posts/*. I think you may have made the wrong +> choice about that, so I changed it to go the other way. What do you think? +> +> I've committed support for ./ to ikiwiki now, based on your patch. +> --[[Joey]] |