From: Waylan L. <wa...@gm...> - 2008-11-13 13:58:14
|
On Thu, Nov 13, 2008 at 4:26 AM, Yuri Takhteyev <qar...@gm...> wrote: >> Well, I'm satisfied enough with what I have to release it into the >> wild. I'm not convinced it's ready for prime time just yet, but I >> think it's mostly there. I started this as an extension that replaced >> the core parser rather than hacking on the existing code in >> markdown.py. For one, it made timing against the old code easier, and >> two, with none of the old code in front of me, it forced me to start >> from scratch. Unfortunately, after working out the remaining edge >> cases, it is barely any faster than the old code, but it is much more >> customizable, so we do gain a lot IMO. > > Yes, this certainly looks more customizable and is also easier to > understand. Good job! If we can switch to this implementation > without breaking too many tests, then let's just do this. Thanks. I crunched on the bugs last night and only have one failing test left. I'll push once I get a a few implementation details worked out. Speaking of which, would you suggest leaving the processors in the parser class, or should they be defined in the Markdown class and passed into the parser on init? The latter seems to provide a more consistent api for extension authors to me. Any input in that respect would be appreciated. > > A few small details: > > 1. Now that this is fresh in your head, please add comments on how this works. > 2. I would get rid of all abbreviations. E.g., I would make it > "SetexHeaderProcessor" instead of "SHeaderProcessor". > 3. I would replace 4 with TAB_LENGTH everywhere. > All good points. Will do. -- ---- Waylan Limberg wa...@gm... |