fixed another string literal problem with func defs

This commit is contained in:
David Halter
2012-10-14 02:44:12 +02:00
parent 766acb5757
commit be595d326d

View File

@@ -199,10 +199,11 @@ def show_func_def(call_def, completion_lines=0):
# Check the replace stuff for strings, to append them
# (don't want to break the syntax)
regex_quotes = '\\\\*["\']+'
regex_quotes = r'''\\*["']+'''
# `add` are all the quotation marks.
add = ''.join(re.findall(regex_quotes, replace))
if add:
# search backwards
if add and replace[0] in ['"', "'"]:
a = re.search(regex_quotes + '$', prefix)
add = ('' if a is None else a.group(0)) + add