Commits

Georg Brandl  committed 62f32f4 Merge

Merged in sjorek/pygments-main/fix/pygments-lexer-ExtendedRegexLexer-get_tokens_unprocessed_undefined-statestack-variable (pull request #244)

Fix: undefined `statestack` variable in `pygments.lexer.ExtendedRegexLexer.get_tokens_unprocessed(…)`

  • Participants
  • Parent commits 42e66c2, 53e6a52

Comments (0)

Files changed (1)

File pygments/lexer.py

                                 if state == '#pop':
                                     ctx.stack.pop()
                                 elif state == '#push':
-                                    ctx.stack.append(statestack[-1])
+                                    ctx.stack.append(ctx.stack[-1])
                                 else:
                                     ctx.stack.append(state)
                         elif isinstance(new_state, int):