Dig that funky extensibility groove. :)
I went more of the "plugin" route with Junct, that collab tool I mentioned. By that I basically mean you write a class instead of a function for new behavior. Example signature:
class TableRule(RegexRule):\n def process(self, topic, content, UI):
Point being I tried to make it easy to write a new module when you wanted new parsing functionality. Still just a callable. But then it was expected with heavyweight parsers (like Calendar, Progress tracking, etc) that the "plugin" module would also include the UI code for new pages.
In addition, I had a need to do multiple passes on the content, and allow some handlers to "lock down" the portions of the content which they altered, so they couldn't then be munged by a later handler. I ended up making a LockableString class with finditer() and sub() methods (a la RE). Plus there were some handlers which a simple regex couldn't handle--Wiki-style formatting stuff.
Hmm... that's been running stably for a month now here at work. I should probably put it up somewhere...