add spaces to additional get_definition quotes, fixes #63

This commit is contained in:
David Halter
2013-01-04 10:55:43 +01:00
parent bd01c84e9f
commit 62d9b564f9

View File

@@ -218,7 +218,8 @@ def show_func_def(call_def=None, completion_lines=0):
# (don't want to break the syntax) # (don't want to break the syntax)
regex_quotes = r'''\\*["']+''' regex_quotes = r'''\\*["']+'''
# `add` are all the quotation marks. # `add` are all the quotation marks.
add = ''.join(re.findall(regex_quotes, replace)) # join them with a space to avoid producing '''
add = ' '.join(re.findall(regex_quotes, replace))
# search backwards # search backwards
if add and replace[0] in ['"', "'"]: if add and replace[0] in ['"', "'"]:
a = re.search(regex_quotes + '$', prefix) a = re.search(regex_quotes + '$', prefix)