From: Yuri T. <qar...@gm...> - 2008-07-01 09:12:35
|
> Just one question though. Why did you split convert into two methods > (convert & markdownToTree) when all you needed to do was add one > additional line to convert for the extra step to run inline patterns? > We have enough methods as it is. In fact, I've considered combining > convert and _transform as they are never called any different way. This was my suggestion. We'll need to decide whether to consider the new markdownToTree() public or private, but I do think it will be useful to clearly separate the conversion into those two steps. > Which, makes me think - if applyInlinePatterns operates on a DOM of > the entire document, why not make it a postprocessor? That may be a > little drastic, but it would open up a few more possibilities for > overriding behavior. Just a thought. Interesting. Not sure what exactly we would gain from it, but it should be possible. Let's not worry about this for now, though. I think the next step should be dropping all the current inline patterns and replacing them with simple regular expression substitutions, perhaps borrowed from Trent's code. In fact, we should see if applyInlinePatterns could just use a chunk of Trent's code "as is". - yuri -- http://sputnik.freewisdom.org/ |