~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/doc_generate/writers/texinfo.py

  • Committer: John Arbash Meinel
  • Date: 2011-01-12 21:27:00 UTC
  • mto: This revision was merged to the branch mainline in revision 5605.
  • Revision ID: john@arbash-meinel.com-20110112212700-esqmtrmevddxrsq2
Clean up the test slightly, hoping to avoid race conditions, update NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
    def depart_topic(self, node):
124
124
        pass
125
125
 
126
 
    def visit_compound(self, node):
127
 
        # compound is new in sphinx >= 1.0 and just add a optional layer so we
128
 
        # relay the text to the parent when it occurs. This may requires a
129
 
        # cleaner approach once we settle on which sphinx versions we want to
130
 
        # support.
131
 
        set_item_list_collector(node, 'text')
132
 
 
133
 
    def depart_compound(self, node):
134
 
        text = ''.join(node['text'])
135
 
        node.parent.collect_text(text)
136
 
 
137
126
    def visit_paragraph(self, node):
138
127
        set_item_list_collector(node, 'text')
139
128
 
154
143
        # FIXME: Using a different visitor specific to toctree may be a better
155
144
        # design and makes code clearer. -- vila 20100708
156
145
        if node.has_key('toctree'):
157
 
            if node['text']:
158
 
                node.parent.collect_text('@menu\n')
159
 
                node.parent.collect_text(''.join(node['text']))
160
 
                node.parent.collect_text('@end menu\n')
 
146
            node.parent.collect_text('@menu\n')
 
147
            node.parent.collect_text(''.join(node['text']))
 
148
            node.parent.collect_text('@end menu\n')
161
149
            self.in_toctree = False
162
150
        elif self.in_toctree:
163
151
            # * FIRST-ENTRY-NAME:(FILENAME)NODENAME.     DESCRIPTION