[Epydoc-devel] Bugs for epydoc 3.0.1 and current svn
Brought to you by:
edloper
From: Thomas K. <sou...@sc...> - 2009-05-23 07:46:25
|
Hi, @list admin: please ignore mail with same topic from yesterday, sender mail address was wrong! As announced a few days before: 2 Bugs, which I have found. This is a uninitialized variable. Because center is True on default HTMLWriter class, this bug isn't seen normaly. diff -ruN epydoc-3.0.1_orig/epydoc/docwriter/dotgraph.py epydoc_3.0.1/epydoc/docwriter/dotgraph.py --- epydoc-3.0.1_orig/epydoc/docwriter/dotgraph.py 2008-01-28 19:15:33.000000000 +0100 +++ epydoc_3.0.1/epydoc/docwriter/dotgraph.py 2008-06-04 18:41:02.000000000 +0200 @@ -168,6 +168,7 @@ title_align = 'center' table_width = '' + s = '' if center: s = '<center>' if title or caption: s += ('<table border="0" cellpadding="0" cellspacing="0" ' The second happens, if docutils > 0.5 will be used. data attribute on Node class isn't available after version 0.5. But on other places in code method astext is used, so this fix should also work with docutils version 0.5. diff -ruN epydoc-orig/epydoc/markup/restructuredtext.py epydoc-new/epydoc/markup/restructuredtext.py --- epydoc-orig/epydoc/markup/restructuredtext.py Mon Jan 28 18:15:34 2008 +++ epydoc-new/epydoc/markup/restructuredtext.py Thu May 7 07:18:33 2009 @@ -304,10 +304,11 @@ # Extract the first sentence. for child in node: if isinstance(child, docutils.nodes.Text): - m = self._SUMMARY_RE.match(child.data) + data = child.astext() + m = self._SUMMARY_RE.match(data) if m: summary_pieces.append(docutils.nodes.Text(m.group(1))) - other = child.data[m.end():] + other = data[m.end():] if other and not other.isspace(): self.other_docs = True break @@ -489,10 +490,11 @@ if (len(fbody[0]) > 0 and isinstance(fbody[0][0], docutils.nodes.Text)): child = fbody[0][0] - if child.data[:1] in ':-': - child.data = child.data[1:].lstrip() - elif child.data[:2] in (' -', ' :'): - child.data = child.data[2:].lstrip() + data = child.astext() + if data[:1] in ':-': + data = data[1:].lstrip() + elif data[:2] in (' -', ' :'): + data = data[2:].lstrip() # Wrap the field body, and add a new field self._add_field(tagname, arg, fbody) Others (some proposals from me) will come with extra posting. cu, Thomas |