summaryrefslogtreecommitdiff
path: root/doc/todo
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-05-29 18:57:59 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-05-29 18:57:59 +0000
commit81cf2149f1a65978c8063023b9d6425d387294af (patch)
treeb7a1f40251f9cf14e9277b37ebc2ce5db41bdf5e /doc/todo
parentb229e2adc2d2e1ad9791cf64a925f382350accf0 (diff)
web commit by cworth
Diffstat (limited to 'doc/todo')
-rw-r--r--doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn39
1 files changed, 37 insertions, 2 deletions
diff --git a/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn b/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn
index c1338f60c..4197cece7 100644
--- a/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn
+++ b/doc/todo/Support_wildcard_inside_of_link__40____41___within_a_pagespec.mdwn
@@ -4,5 +4,40 @@ I'd like to have my blog page look like this:
\[[inline pages="link(tag/*)"]]
-But I [tried](http://www.cworth.org/blog) that and it doesn't seem to
-work in ikiwiki 2.1 at least.
+That doesn't work in ikiwiki 2.1, but I have it
+[working](http://www.cworth.org/blog) with the following patch:
+
+ From 6149386084417fb8375d08446438b20ed52d6882 Mon Sep 17 00:00:00 2001
+ From: Carl Worth <cworth@cworth.org>
+ Date: Tue, 29 May 2007 11:43:21 -0700
+ Subject: [PATCH] Allow for glob matching inside of link() within a pagespec
+
+ ---
+ IkiWiki.pm | 11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+ diff --git a/IkiWiki.pm b/IkiWiki.pm
+ index 38aa46a..cd42e8d 100644
+ --- a/IkiWiki.pm
+ +++ b/IkiWiki.pm
+ @@ -1082,10 +1082,15 @@ sub match_link ($$;@) { #{{{
+ my $links = $IkiWiki::links{$page} or return undef;
+ return IkiWiki::FailReason->new("$page has no links") unless @$links;
+ my $bestlink = IkiWiki::bestlink($from, $link);
+ - return IkiWiki::FailReason->new("no such link") unless length $bestlink;
+ foreach my $p (@$links) {
+ - return IkiWiki::SuccessReason->new("$page links to $link")
+ - if $bestlink eq IkiWiki::bestlink($page, $p);
+ + if (length $bestlink) {
+ + return IkiWiki::SuccessReason->new("$page links to $link")
+ + if $bestlink eq IkiWiki::bestlink($page, $p);
+ + }
+ + else {
+ + return IkiWiki::SuccessReason->new("$page links to page matching $link")
+ + if match_glob ($p, $link, %params);
+ + }
+ }
+ return IkiWiki::FailReason->new("$page does not link to $link");
+ } #}}}
+ --
+ 1.5.1.1.g6aead