#187 Broken backwards pointer in docutils.nodes.list_item.parent

sandbox
closed-out-of-date
nobody
None
5
2013-03-22
2012-03-25
Lyse
No

When writing a custom directive based on BaseAdmonition I had to build a path of all parent sections to the current position in the document tree. I implemented this as a bottom up search starting from my custom directive using node's parent attributes. This worked fine until I put the custom directive inside an unodered list item in my reStructuredText document. I noticed list_item's backwards pointer is not set, i.e. its parent attribute is None. I would have expected list_item.parent is a reference to the corresponding bullet_list or at least some other parent element but definitely not None.

Python 2.7.2-10
Docutils 0.8.1-6
both from Debian GNU/Linux Wheezy (Testing) repositories

Discussion

  • Günter Milde
    Günter Milde
    2013-02-13

    This seems to be fixed in current versions (0.8.1 is from 2011-08-30).
    Please re-try.

     
  • Günter Milde
    Günter Milde
    2013-02-13

    • status: open --> pending-out-of-date
     
  • Günter Milde
    Günter Milde
    2013-03-22

    • status: pending-out-of-date --> closed-out-of-date
    • milestone: --> sandbox