From 8efaf883644465a4486edc55834f8677cd8e9a3d Mon Sep 17 00:00:00 2001 From: hpk Date: Tue, 13 Feb 2007 22:56:42 +0100 Subject: [PATCH] [svn r38762] slight sanitizing and allow to change sep in one place --HG-- branch : trunk --- py/doc/confrest.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/py/doc/confrest.py b/py/doc/confrest.py index dcd89b4b7..10c577545 100644 --- a/py/doc/confrest.py +++ b/py/doc/confrest.py @@ -31,17 +31,21 @@ class Page(object): return html.a(name, href=path, class_="menu") def fill_menubar(self): - self.menubar = html.div( - self.a_docref("index", "index.html"), " ", - self.a_apigenref("api", "api/index.html"), " ", - self.a_apigenref("source", "source/index.html"), " ", - self.a_docref("contact", "contact.html"), " ", - self.a_docref("download", "download.html"), " ", - html.a("contact", href="contact.html", class_="menu"), " ", - html.a("download", href="download.html", class_="menu"), " ", - id="menubar", - ) - + items = [ + self.a_docref("index", "index.html"), + self.a_apigenref("api", "api/index.html"), + self.a_apigenref("source", "source/index.html"), + self.a_docref("contact", "contact.html"), + self.a_docref("download", "download.html"), + html.a("contact", href="contact.html", class_="menu"), + html.a("download", href="download.html", class_="menu"), + ] + items2 = [items.pop(0)] + sep = " " + for item in items: + items2.append(sep) + items2.append(item) + self.menubar = html.div(id="menubar", *items2) def fill(self): content_type = "%s;charset=%s" %(self.type, self.encoding)