From: Waylan L. <wa...@gm...> - 2008-11-05 13:45:55
|
On Wed, Nov 5, 2008 at 3:14 AM, John Szakmeister <jo...@sz...> wrote: > > The main markdown parser marked some methods with __'s... which is > supposed to be the indicator that the method is private. So it's a > little bit disturbing that DefListParser is drilling into those > internals. Perhaps it's indicative that those methods should be > exposed more, or that we need an extra hook point into the code? That's a valid point and one I've thought about as well. Unfortunately, I don't have a good answer yet. Part of my motivation in doing this extension was to raise these questions and see how things go. > > It looks like in _MarkdownParser__processParagraph() that > self.__processHR() and self.__processHeader() need to be > self._MarkdownParser__processHR() and > self._MarkdownParser__processHeader(). By default, python will try > calling self._DefListParser__processHR() and > self._DefListParser__processHeader(), which don't exist. Ah, right. It occurred to after I went to bed last night that I never tested to make sure all other markdown syntax was still parsd correctly. I'll get on that next. > It looks > like the only difference in your process paragraph is that it also > watches for 'dd'. Is there some way to either expose that, or just > add this edge to the actual MarkdownParser? I realize that markdown > doesn't natively produce those tags. But it seems like a shame to > have to edit the same code in two places if you find a bug (if you > remember the other one exists!). I had similar thoughts, but that was the easiest way to get things working. At the same time, I don't look forward to maintaining this in parallel with the markdown core. Certainly valid concerns. > > I think it'd be nice for the table extension to function like PHP > markdown's implementation. But that's just a nicety. :-) > Oh yeah, I forgot about that one. Thanks for the comments John. You've given me some things to think about and reminded me of a few others. -- ---- Waylan Limberg wa...@gm... |