[pmwiki-devel] Proposal: "Directives" Registry

Martin Fick mogulguy at yahoo.com
Thu Aug 9 13:04:26 CDT 2007


--- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> I just need to think about it a bit further to
> decide if this really belongs in the core -- if so, 
> then I'll probably add MarkupDirective()
> into an upcoming beta.

If you are going to make a directive API, I have some
other ideas of potentially useful features:

1) The ability to specify the arguments  (number
and/or names of) that directives can/must have?

2) The ability to easily define encapsulating
directives that have a (:start:) and (:end:) directive


One advantage of a directive API is that the regular
expression handling for directives can be done in a
more consistent way and presumably this way would be
better than what most of us would come up with on the
fly trying to create a simple directive definition.
I.E. I don't think that my directives can handle
argument quoting properly.  I.E. if :) is inside the
quotes it will probably terminate my directive
definitions.  If someone smarter than me handles this
properly in the directive API, I will automatically
benefit from it by using the API. :)

Also, since directives may get processed at different
times (depending on the "when",) the regular
expression definitions can be adapted to be properly
suited to running at the time the "when" runs if need
be, one less complication for recipe authors to think
about.

-Martin



       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC



More information about the pmwiki-devel mailing list