From: Waylan L. <wa...@gm...> - 2008-07-01 00:55:02
|
Cool. 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. 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. Now to find the time to play with it... On Mon, Jun 30, 2008 at 7:47 PM, Artem <ne...@gm...> wrote: > Hi all, > > Now Markdown.convert method uses two-step approach. 1 - it converts > markdown to DOM tree, without applying inline patterns, 2 - it parses > DOM tree and applying inline patterns. > > The main problem with inline patterns is solved. I re-implemented Inline > patterns mechanism, using string with placeholders for DOM elements. Now > all of those examples: > > [*test*](http://example.com) > *[test](http://example.com)* > **[*test*](http://example.com)** > __*[test](http://example.com)*__ > > works fine: > > <p><a href="http://example.com"><em>test</em></a> > <em><a href="http://example.com">test</a></em> > <strong><a href="http://example.com"><em>test</em></a></strong> > <strong><em><a href="http://example.com">test</a></em></strong> > </p> > > The new version is 10-20% faster. Not all tests from the test suite is > working now, but I'm working on it. > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Python-markdown-discuss mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-markdown-discuss > -- ---- Waylan Limberg wa...@gm... |