[Doc-SIG] docutils HTML contents generation and Netscape

Pearu Peterson pearu@cens.ioc.ee
Sat, 3 Aug 2002 14:51:13 +0300 (EEST)


While viewing docutils generated html files with Netscape (4.77) I have
noticed that links in Contents to document sections do not work at all
(they work nicely with Mozilla though). It seems that Netscape does not
understand HTML div tags well.

Here follows my changes to docutils/writers/html4css1.py (in CVS) that
make the links work for Netscape as well:

diff -r1.32 html4css1.py
<                 self.body.append('<a class="toc-backref" href="#%s">'
<                                  % node['refid'])
>                 node_id = nodes.make_id(node.astext())
>                 self.body.append('<a class="toc-backref" href="#%s" name="%s">'
>                                  % (node['refid'],node_id))

BTW, I just started to use docutils-0.2 for documenting the f2py project
and I already find docutils quite usable despite its alpha nature that
sometimes shows up. I'll try to report these glitches but without trying
to fix them too hard if that's OK.