diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2011-02-15 01:16:18 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2011-02-15 01:16:18 +0100 |
commit | 6040154bde912222528cd84b0d8bec7bc60bb65a (patch) | |
tree | 90441a1d48ca6e05fd99df053a7e0cce4dfce806 /templates/page.mako | |
parent | 0efc1162f77bcea770f72dbe8db1caafa8090e66 (diff) | |
download | web-6040154bde912222528cd84b0d8bec7bc60bb65a.tar.gz web-6040154bde912222528cd84b0d8bec7bc60bb65a.tar.bz2 web-6040154bde912222528cd84b0d8bec7bc60bb65a.zip |
More of this w3c stuff
Diffstat (limited to 'templates/page.mako')
-rw-r--r-- | templates/page.mako | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/page.mako b/templates/page.mako index aa2aa51..1a43d49 100644 --- a/templates/page.mako +++ b/templates/page.mako @@ -1,4 +1,5 @@ <%! + trans = {ord(" "):u"-", ord("/"):"-", ord("(") : None, ord(")"):None} title = "" uses_toc = False %> @@ -24,15 +25,16 @@ ${page_text} <% if self.attr.uses_toc: c = capture(caller.body) - name = c.replace(" ", "_").replace("/", "_").lower() + name = c.translate(trans) tlist = getattr(self.attr, "tlist", []) tlist.append((str(name), str(c))) self.attr.tlist = tlist + id_tag = "id=\"%s\"" % name else: - name = "#" + id_tag = '' %> - <${tag}><a name="${name}"><span class="hstart">» </span></a>${caller.body()}</${tag}> + <${tag}><a ${id_tag}><span class="hstart">» </span></a>${caller.body()}</${tag}> </%def> <%def name="toc()"> |