From: Waylan L. <wa...@gm...> - 2010-10-17 15:11:58
|
dtyschenko, Thanks for you report on Ticket 80[1] for Python-Markdown. I'm responding to your report via the list [2] as I'm not sure how or if we should fix the reported problem. At first I was a little confused by your report as we don't do anything with comments - if they exist in the source they are pulled out as rawhtml and never see ElementTree. Then I realized you must be using a third party extension which create html comments and inserts them into the tree. That is certainly something we want to support and allow you to do. However, it appears you are also using the html4 serializer - which we borrowed (with permission) from the ElementTree 1.3 Preview (still in alpha since 2007 AFAICT). Any changes to that serializer would ideally be changes made upstream as well. In fact, your proposed fix, to also import parts of ElementTree when using cElementTree feels wrong and defeats the purpose of cElementTree in the first place. In fact, I see in the notes to ElementTree 1.3 there is a note [3] that it only works with cElementTree 1.0.6 or later. What version are you using? I'm going to say that that is a limitation of the html4 serializer. If you are using cElementTree, you must be using version 1.0.6 or later. In other words, this is a bug in cElmentTree, not a bug in Markdown. Even if you are using a version greater than 1.0.6, I'd say this is still a bug in cElementTree. Of course, if anyone has any better suggestions, I'm open to entertain them - and we accept patches. Oh, and regarding your final comment regarding `markdown.isBlockLevel` choking in Comment nodes, I'll patch that. We definitely should support using Comment nodes there. [1]: http://www.freewisdom.org/projects/python-markdown/Tickets/000080 [2]: https://lists.sourceforge.net/mailman/listinfo/python-markdown-discuss [3]: http://effbot.org/zone/elementtree-13-intro.htm#performance Waylan Limberg |