Changeset 3417
- Timestamp:
- 03/25/08 09:35:22 (8 months ago)
- Files:
-
- tocmacro/0.11/setup.py (modified) (1 diff)
- tocmacro/0.11/tractoc/macro.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tocmacro/0.11/setup.py
r1954 r3417 6 6 setup( 7 7 name = 'TracTocMacro', 8 version = '11.0.0. 2',8 version = '11.0.0.3', 9 9 packages = ['tractoc'], 10 10 #package_data = { 'toc': ['templates/*.cs','htdocs/*' ] }, tocmacro/0.11/tractoc/macro.py
r3030 r3417 121 121 elif arg == 'notitle': 122 122 params['min_depth'] = 2 # Skip page title 123 elif arg == 'titleindex': 123 elif (arg == 'titleindex') or (arg == 'sectionindex'): 124 # sectionindex is a page-context sensitive titleindex 125 if arg == 'sectionindex': 126 params['section_index'] = True 124 127 params['title_index'] = True 125 128 default_heading = default_heading and 'Page Index' … … 135 138 # Has the user supplied a list of pages? 136 139 if not pagenames: 137 if 'title_index' in params: 140 # Be sure to test section_index first as title_index is also true in this case 141 if 'section_index' in params: 142 # Use 'parent' of current page (level delimiter is /), if any 143 toks = re.match('^(?P<parent>.*)/[^/]*$',current_page) 144 if toks: 145 pagenames.append(toks.group('parent')+'/') 146 else: 147 pagenames.append('*') 148 elif 'title_index' in params: 138 149 pagenames.append('*') # A marker for 'all' 139 150 else: … … 144 155 temp_pagenames = [] 145 156 for pagename in pagenames: 157 if 'section_index' in params: 158 # / is considered an equivalent to * in sectionindex 159 if pagename == '/': 160 pagename = '*' 161 if not pagename.endswith('*'): 162 pagename += '*' 146 163 if pagename.endswith('*'): 147 164 temp_pagenames.extend(sorted(
