From: Waylan L. <wa...@gm...> - 2010-10-17 15:49:22
|
On Sun, Oct 17, 2010 at 11:11 AM, Waylan Limberg <wa...@gm...> wrote: [snip] > > 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. I should point out that anyone can provide there own serializers, so if the above is really not an option, you can always use your own serializer that does what you want. I'm a little hesitant to do so with our markdown.html4 module because that is under a different license than the rest of the project and copyrighted to the author of ElementTree. > 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. Hmm, now I'm looking at the code and all isBlockLevel does it take a tag, which is a string. Perhaps elsewhere in the code, we are assuming every ElementTree element has a tag and that is where the exception is being raised. Like in markdown.treeprocessors.PrettifyTreeprocessor. Should we be checking that an element has a tag first and behave differently if not? Oh, and in the most recent development codebase, its at `markdown.util.isBlockLevel`. You can get the code here: http://gitorious.org/python-markdown -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg |