aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation
diff options
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/api.rst5
-rwxr-xr-xDocumentation/sphinx/cdoc.py14
2 files changed, 13 insertions, 6 deletions
diff --git a/Documentation/api.rst b/Documentation/api.rst
index 1270551c..cb8a0982 100644
--- a/Documentation/api.rst
+++ b/Documentation/api.rst
@@ -20,3 +20,8 @@ Typing
~~~~~~
.. c:autodoc:: evaluate.h
+
+Optimization
+~~~~~~~~~~~~
+
+.. c:autodoc:: simplify.c
diff --git a/Documentation/sphinx/cdoc.py b/Documentation/sphinx/cdoc.py
index 2718c86a..318e9b23 100755
--- a/Documentation/sphinx/cdoc.py
+++ b/Documentation/sphinx/cdoc.py
@@ -212,12 +212,14 @@ def convert_to_rst(info):
lst.append((n, l))
if 'desc' in info:
desc = info['desc']
- n = desc[0]
- r = ''
- for l in desc[1:]:
- r += l + '\n'
- lst.append((n, r))
- lst.append((n+1, '\n'))
+ n = desc[0] - 1
+ desc.append('')
+ for i in range(1, len(desc)):
+ l = desc[i]
+ lst.append((n+i, l))
+ # auto add a blank line for a list
+ if re.search(r":$", desc[i]) and re.search(r"\S", desc[i+1]):
+ lst.append((n+i, ''))
elif typ == 'func':
(n, l) = info['func']