Skip to content

Commit 7e4a8f7

Browse files
committed
Simplify regex pattern
1 parent ca73a6d commit 7e4a8f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

markdown/htmlparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
# throwing it away. When we see it, we will process it as data.
4848
htmlparser.starttagopen = re.compile('<[a-zA-Z]|</>')
4949

50-
htmlparser.endtagopen = re.compile('</[a-zA-Z]|</')
50+
htmlparser.endtagopen = re.compile('</[a-zA-Z]?')
5151

5252
# Monkeypatch `HTMLParser` to only accept `?>` to close Processing Instructions.
5353
htmlparser.piclose = re.compile(r'\?>')

0 commit comments

Comments
 (0)