|
From: Waylan L. <wa...@gm...> - 2008-10-21 14:59:00
|
On Mon, Oct 20, 2008 at 9:53 PM, Waylan Limberg <wa...@gm...> wrote:
[snip]
>
> If I understand things correctly, line 1667 is the problem. It currently is:
>
> self._tree[parn]['heap'][1]+brace
>
> and should be:
>
> self._tree[parn]['heap'][1].strip('<>')+brace
>
> The problem is, that takes "second" out of order (in the first test)
> which makes me wonder if ``B=>>`` has special meaning. If so, then
> line 1667 needs to be more sophisticated and do something different
> depending on the value of ``brace``.
>
Now that I've had time to sleep on it, I think that my patch might be
correct. "second" isn't really out of order. Both "second" and "third"
were set to come after "first", but they were never set in relation to
each other so "second" coming after "third" is not wrong, especially
considering that "second" was added later than "third".
If we really want "second" to come before "third", then we should tell
is so with "<third". As "third" is already set to come after "first",
this will force "second" to fall between "first" and "third". That
should provide enough control.
What this essentially means is that when adding items in order (as in
the Markdown class), they should be added using ">the_last_item"
(which is the default when no priority is set on add). However
whenever later inserting nodes, they should be added using
"<some_item" for precision placement.
Is this understanding correct? or am I crazy?
If I'm not crazy (at least with respect to this point), then I'll
commit the patch, update the tests and add a more polished version of
the above explanation to the docs so future users don't get surprised
like I did.
--
----
Waylan Limberg
wa...@gm...
|