8000 fixup! Speed up unnecessarily slow and obtuse dict comparison · html5lib/html5lib-python@4b31aab · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b31aab

Browse files
committed
fixup! Speed up unnecessarily slow and obtuse dict comparison
1 parent 5c9c1be commit 4b31aab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

html5lib/html5parser.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,8 +1022,9 @@ def __init__(self, parser, tree):
10221022
self.endTagHandler.default = self.endTagOther
10231023

10241024
def isMatchingFormattingElement(self, node1, node2):
1025-
return (node1.name == node2.name and< 607B /span> node1.namespace ==
1026-
node2.namespace and node1.attributes == node2.attributes)
1025+
return (node1.name == node2.name and
1026+
node1.namespace == node2.namespace and
1027+
node1.attributes == node2.attributes)
10271028

10281029
# helper
10291030
def addFormattingElement(self, token):

0 commit comments

Comments
 (0)
0