Changeset 3061
- Timestamp:
- 11/27/05 12:23:22 (7 years ago)
- File:
-
- 1 edited
-
trac/trunk/wiki-macros/TracNav.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trac/trunk/wiki-macros/TracNav.py
r3060 r3061 100 100 last wiki link. 101 101 """ 102 103 def format_toc(self, wikitext, out): 102 def format_toc(self, wikitext): 103 self.link = None 104 out = StringIO() 104 105 OneLinerFormatter.format(self, wikitext, out) 105 return self.link106 return out.getvalue(), self.link 106 107 107 108 def __init__(self, env): … … 118 119 # FIXME: CamelCase links are special and not handled by the Formatter... 119 120 120 def format_toc_entry(wikitext, env):121 out = StringIO()122 link = TocFormatter(env).format_toc(wikitext, out)123 return out.getvalue(), link124 125 121 126 122 def get_toc_entry(toc_text, env): … … 128 124 Parse and format the entries in toc_text. 129 125 """ 126 formatter = TocFormatter(env) 130 127 for match in LISTRULE.finditer(toc_text): 131 128 indent = len(match.group('indent')) 132 label, link = format _toc_entry(match.group('rest'), env)129 label, link = formatter.format_toc(match.group('rest')) 133 130 yield indent, link, label 134 131 … … 176 173 """ 177 174 gen = get_toc_entry_and_indent(get_toc_entry(toc_text, env)) 178 toc list, _ = _parse_toc(gen, gen.next())179 return toc list175 toc, _ = _parse_toc(gen, gen.next()) 176 return toc 180 177 181 178
Note: See TracChangeset
for help on using the changeset viewer.
