Skip to content

Commit eb39c43

Browse files
committed
xquery: fix pop from empty stack
1 parent 2738778 commit eb39c43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pygments/lexers/webmisc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ def operator_root_callback(lexer, match, ctx):
128128

129129
def popstate_tag_callback(lexer, match, ctx):
130130
yield match.start(), Name.Tag, match.group(1)
131-
ctx.stack.append(lexer.xquery_parse_state.pop())
131+
if lexer.xquery_parse_state:
132+
ctx.stack.append(lexer.xquery_parse_state.pop())
132133
ctx.pos = match.end()
133134

134135
def popstate_xmlcomment_callback(lexer, match, ctx):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy