diff options
| author | JacekPliszka <Jacek.Pliszka@gmail.com> | 2015-02-12 01:37:46 +0100 |
|---|---|---|
| committer | JacekPliszka <Jacek.Pliszka@gmail.com> | 2015-02-12 01:37:46 +0100 |
| commit | 703aec1fb30dcf5c0ed14552e601e4487707435e (patch) | |
| tree | 8f5beb4e9c71c4e37513b800f118c8c67754804c /sqlparse | |
| parent | 858b366d8fea37424f4f6b3b534190ac873b02c9 (diff) | |
| download | sqlparse-703aec1fb30dcf5c0ed14552e601e4487707435e.tar.gz | |
Fix of problem with multiline treated as stackable while /* /* */ is one comment, not two stacked
Diffstat (limited to 'sqlparse')
| -rw-r--r-- | sqlparse/lexer.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py index a60c789..3e9a1a6 100644 --- a/sqlparse/lexer.py +++ b/sqlparse/lexer.py @@ -315,7 +315,13 @@ class Lexer(object): statestack.pop() elif state == '#push': statestack.append(statestack[-1]) - else: + elif ( + # Ugly hack - multiline-comments + # are not stackable + state != 'multiline-comments' + or not statestack + or statestack[-1] != 'multiline-comments' + ): statestack.append(state) elif isinstance(new_state, int): # pop |
