Commit 3c3f1b10 authored by glondu's avatar glondu

C'est plus propre comme ca.

darcs-hash:20060430072050-68412-cad6875288c8c6f02d65781652b70c8c71f94297.gz
parent 7d9932d3
......@@ -5,6 +5,7 @@
Optional integer argument: maximal depth of listing.
@copyright: 2000, 2001, 2002 by Jrgen Hermann <jh@web.de>
@copyright: 2006 by Grgoire Dtrez <gdetrez@crans.org>
@license: GNU GPL, see COPYING for details.
"""
......@@ -78,16 +79,22 @@ class TableOfContents:
try:
html = [
self.macro.formatter.rawHTML(u'<div id="tableOfContents">'),
self.macro.formatter.rawHTML(u'<h2 id="toctitle">Sommaire</h2>'),
self.macro.formatter.rawHTML(u'<div id="tableOfContentsList">'),
''.join(self.result),
self.macro.formatter.rawHTML(u'</div>'),
self.macro.formatter.rawHTML(u'</div>'),
self.macro.formatter.rawHTML(u'<div class="visualClear"></div>'),
self.macro.formatter.rawHTML(u'<script type="text/javascript" src="/wiki/common/toc/toc.js"></script>'),
self.macro.formatter.open('div', True, {'id': 'tableOfContents'}),
self.macro.formatter.open('h2', False, {'id': 'toctitle'}),
self.macro.formatter.text(u'Sommaire'),
self.macro.formatter.close('h2', True),
self.macro.formatter.open('div', True, {'id': 'tableOfContentsList'}),
''.join(self.result),
self.macro.formatter.close('div', True),
self.macro.formatter.close('div', True),
self.macro.formatter.open('div', False, {'class': 'visualClear'}),
self.macro.formatter.close('div', True),
self.macro.formatter.open('script', False,
{'type': 'text/javascript',
'src': '/wiki/common/toc/toc.js'}),
self.macro.formatter.close('script', True),
]
return u'\n'.join(html)
return u''.join(html)
except:
return ''.join(self.result)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment