Changeset 3058


Ignore:
Timestamp:
11/24/05 14:34:06 (8 years ago)
Author:
moschny
Message:
  • Simplify get_toc_entry_and_indent().
  • Update copyright notice.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trac/trunk/wiki-macros/TracNav.py

    r3057 r3058  
    4545== Author and license == 
    4646 
    47 Copyright 2005 Bernhard Haumacher (haui at haumacher.de) 
     47Copyright 2005 
     48 *  Bernhard Haumacher (haui at haumacher.de) 
     49 *  Thomas Moschny (moschny at ipd.uni-karlsruhe.de) 
    4850 
    4951{{{ 
     
    141143    indentation of the first entry. 
    142144    """ 
    143     try: 
    144         indent, link, label = gen.next() 
    145     except StopIteration: 
    146         indent = -1 
    147     yield indent 
    148  
    149     ready = False 
    150     while not ready: 
    151         yield link, label 
     145    while True: 
    152146        try: 
    153147            indent, link, label = gen.next() 
    154148        except StopIteration: 
    155             indent, ready = -1, True 
     149            yield -1 
     150            return 
    156151        yield indent 
     152        yield link, label         
    157153 
    158154 
Note: See TracChangeset for help on using the changeset viewer.