|
From: Waylan L. <wa...@gm...> - 2009-01-11 02:25:33
|
On Sat, Jan 10, 2009 at 5:54 PM, Artem Yunusov <se...@sp...> wrote:
>
>
> On Sat, Jan 10, 2009 at 11:27 PM, Waylan Limberg <wa...@gm...> wrote:
>>
>> On Sat, Jan 10, 2009 at 7:32 AM, Eric Abrahamsen <gi...@gm...> wrote:
>> >> We had talked at one point of having markdown import
>> >> lxml rather than ElementTree if it was available. Don't remember why
>> >> did decided not to. The list archives would answer that. However, if
>> >> you could provide a patch that works - I'll likely commit it.
>> >
>> > Looking through the mailing list archives, it looks like things stopped
>> > at
>> > "yes, that would be a good idea". As far as I can tell there wasn't any
>> > further action. I tried adding lxml to the import cascade in
>> > etree_loader.py, and it imports okay, but fails tests (I can provide
>> > more
>> > details if necessary).
>>
>> Yeah, I seem to recall there being some differences between the two. I
>> wasn't the one who wrote that code, so the details aren't as clear to
>> me. Perhaps the final decision was made by the core devs off list.
>
> As far as I remember, there were some problems with several tests, and no
> great performance boost in compare with cElementTree(only 4%), so we decided
> to go with standard cElementTree/ElementTree.
>
> Eric, If you want HTML output you can use ElementTree 1.3 [1]
>
> tree.write("out.html", method="html")
>
For the record, ET 1.3 is still in alpha and the docs specifically
state that the HTML API is still in flux, so I doubt we will be adding
that support to Python-Markdown for the time being. Perhaps in a
future release. However, reviewing their code may be a good first step
in developing a list of changes that need to be made through
text-replacement in a postprocessor. While not the best solution, it
is better than nothing.
--
----
Waylan Limberg
wa...@gm...
|