From 22b56d3d2db211468f040772529e56fd16bb2151 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 9 Aug 2009 20:42:11 +0000 Subject: Bug #280690 - Fix incorrect idendification of start quote as end quote when the start quote is immediately followed by a newline. svn path=/main/trunk/; revision=13959 --- bin/filter-bash-environment.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/filter-bash-environment.py b/bin/filter-bash-environment.py index 42ebd7447..381199617 100755 --- a/bin/filter-bash-environment.py +++ b/bin/filter-bash-environment.py @@ -48,7 +48,12 @@ def filter_bash_environment(pattern, file_in, file_out): quote = var_assign_match.group(3) filter_this = pattern.match(var_assign_match.group(2)) \ is not None - if quote is not None and not have_end_quote(quote, line): + # Exclude the start quote when searching for the end quote, + # to ensure that the first quote is not identified as the + # end quote (happends if there is a newline immediately after + # the start quote). + if quote is not None and not \ + have_end_quote(quote, line[var_assign_match.end(2)+2:]): multi_line_quote = quote multi_line_quote_filter = filter_this if not filter_this: -- cgit v1.2.3-1-g7c22