summaryrefslogtreecommitdiffstats
path: root/makeapi
diff options
context:
space:
mode:
Diffstat (limited to 'makeapi')
-rwxr-xr-xmakeapi11
1 files changed, 5 insertions, 6 deletions
diff --git a/makeapi b/makeapi
index 1d418fe69..0d3709882 100755
--- a/makeapi
+++ b/makeapi
@@ -45,14 +45,13 @@ def parse_options():
def strip_doc(line):
"""
- Remove the doc= line from the repr() of a Paramter.
+ Remove the doc= part from the repr() of a Parameter.
"""
- s = line.find(' doc=')
- if s >= 0:
- e = line.find('), ', s)
- line = '%s%s' % (line[0:s], line[e+2:])
- return line
+ # this pattern allows up to 2 nested parentheses in doc part
+ newline = re.sub(r', doc=([^(,]+)(\([^()]*(\([^()]+\)[^()]*)?\))?', '', line)
+
+ return newline
def make_api():
"""