[Mediacloth-devel] [PATCH] Support category links
thiago.arrais at gmail.com
Mon Mar 24 23:22:36 EDT 2008
Thanks for the patch. I definitely liked what I saw, CategoryLink is
certainly a new AST node _and_ a grammar production. But it seems like
category links [[:Category:foo]] and category additions
[[Category:foo]] are really different things. Not only between
themselves, but also very different than page and resource links. The
link handler needs to know about that.
If I were writing an app built on top of MediaCloth (and it happens
that I am :-), I would like to receive different events for different
types of links. I would like a `link_for` method to be called when
processing a page link, a `link_for_resource` method when processing a
resource link and other methods for category additions and links
(maybe `link_for_category` and `category_addition` ?!?).
I see that you included a flag in the AST node, but the link handler
does not get to see that, only the tree walker. It would be nice if
the link handler did not need to handle the conditional logic itself.
More information about the Mediacloth-devel