diff options
author | Darik Gamble <darik.gamble@gmail.com> | 2015-08-19 16:53:45 -0400 |
---|---|---|
committer | Darik Gamble <darik.gamble@gmail.com> | 2015-08-19 16:53:45 -0400 |
commit | 68a91f81218d6cff9f61b28abaf0a9641868eaa6 (patch) | |
tree | 9ff52cb1756de767ea9e005674e552ebcd1aa7ba | |
parent | 4e66819343ba4e5a9891a4cd65df7914aabea06c (diff) |
Be more explicit when incrementing index value
-rw-r--r-- | pgcli/packages/parseutils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pgcli/packages/parseutils.py b/pgcli/packages/parseutils.py index 8f5f4fc8..2fd57752 100644 --- a/pgcli/packages/parseutils.py +++ b/pgcli/packages/parseutils.py @@ -213,8 +213,11 @@ def _parsed_is_open_quote(parsed): elif (tok.ttype in Token.Name.Builtin and dollar_quote_regex.match(tok.value)): # Find the matching closing dollar quote sign - for (i, tok2) in enumerate(tokens[i+1:], i+1): + for (j, tok2) in enumerate(tokens[i+1:], i+1): if tok2.match(Token.Name.Builtin, tok.value): + # Found the matching closing quote - continue our scan for + # open quotes thereafter + i = j break else: # No matching dollar sign quote |