Revert "comments" (stupid commit)
[ikiwiki] / doc / todo / tag_pagespec_function.mdwn
1 Implementing tags in terms of links is clever, but it would be nice if it was
2 opaque in both directions: tagging and matching tags. Writing pagespecs to
3 find out which pages are tagged with a given name means that the pagespec is
4 tied to whatever the tagbase is.
5
6 This patch adds a pagespec function 'tag' which lets you write pagespecs to
7 match tagged pages independent of whatever the tagbase is set to.
8
9  -- [[users/Jon]] 2009/02/17
10
11 [[!tag patch]]
12
13     --- a/plugins/IkiWiki/Plugin/tag.pm 2009-02-16 11:30:11.000000000 +0000
14     +++ b/plugins/IkiWiki/Plugin/tag.pm 2009-02-17 15:40:03.000000000 +0000
15     @@ -125,4 +125,12 @@
16         }
17      }
18      
19     +package IkiWiki::PageSpec;
20     +
21     +sub match_tag ($$;@) {
22     +   my $page = shift;
23     +   my $glob = shift;
24     +    return match_link($page, IkiWiki::Plugin::tag::tagpage($glob));
25     +}
26     +
27      1