Commit 32574117 authored by Amos Latteier's avatar Amos Latteier

Fixed a doc string display bug, and tweaked the API Documentation display to...

Fixed a doc string display bug, and tweaked the API Documentation display to look better with API docs that have lots of mostly empty classes.
parent b79e0f91
...@@ -329,6 +329,8 @@ def trim_doc_string(text): ...@@ -329,6 +329,8 @@ def trim_doc_string(text):
if len(lines) > 1: if len(lines) > 1:
min_indent=None min_indent=None
for line in lines[1:]: for line in lines[1:]:
if not line:
continue
indent=len(line) - len(string.lstrip(line)) indent=len(line) - len(string.lstrip(line))
if indent < min_indent or min_indent is None: if indent < min_indent or min_indent is None:
min_indent=indent min_indent=indent
...@@ -337,4 +339,3 @@ def trim_doc_string(text): ...@@ -337,4 +339,3 @@ def trim_doc_string(text):
return string.join(nlines, '\n') return string.join(nlines, '\n')
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<h1>API Documentation</h1> <h1>API Documentation</h1>
<dtml-if "_.len(apis) > 1"> <dtml-if "_.len(apis) > 1">
<h3>Classes</h3>
<dl><dd> <dl><dd>
<h2 class="api"> <h2 class="api">
<dtml-in apis> <dtml-in apis>
...@@ -25,4 +26,4 @@ ...@@ -25,4 +26,4 @@
</dtml-unless> </dtml-unless>
</dtml-in> </dtml-in>
<dtml-var standard_html_footer> <dtml-var standard_html_footer>
\ No newline at end of file
<a name="<dtml-var name>"></a> <a name="<dtml-var name>"></a>
<h2 class="api"> <h2 class="api">class
<dtml-var name> <dtml-var name><dtml-if extends>
<dtml-if extends> (<dtml-in extends>
( <a href="/Control_Panel/Products/<dtml-var sequence-item>"><dtml-var
<dtml-in extends> sequence-key></a><dtml-unless sequence-end>, </dtml-unless>
<a href="/Control_Panel/Products/<dtml-var sequence-item>"><dtml-var sequence-key></a> </dtml-in>)
<dtml-unless sequence-end>,</dtml-unless> </dtml-if>
</dtml-in>
)
</dtml-if>
</h2> </h2>
<dl> <dl>
...@@ -18,7 +15,7 @@ ...@@ -18,7 +15,7 @@
</dl> </dl>
<dtml-if constructor> <dtml-if constructor>
<hr noshade> <hr>
<h3>Product Constructor</h3> <h3>Product Constructor</h3>
<dtml-with constructor> <dtml-with constructor>
<dtml-var view> <dtml-var view>
...@@ -26,7 +23,7 @@ ...@@ -26,7 +23,7 @@
</dtml-if> </dtml-if>
<dtml-if "attributes or methods"> <dtml-if "attributes or methods">
<hr noshade> <hr>
</dtml-if> </dtml-if>
<dtml-in attributes> <dtml-in attributes>
...@@ -40,3 +37,4 @@ ...@@ -40,3 +37,4 @@
</dtml-in> </dtml-in>
</dtml-if> </dtml-if>
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