Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf696f4

Browse files
committed
Fixed input stream regexp cache
--HG--extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401156
1 parent313c7b0 commitbf696f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/html5lib/inputstream.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,13 @@ def charsUntil(self, characters, opposite = False):
308308

309309
# Use a cache of regexps to find the required characters
310310
try:
311-
chars=charsUntilRegEx[characters]
311+
chars=charsUntilRegEx[(characters,opposite)]
312312
exceptKeyError:
313313
forcincharacters:assert(ord(c)<128)
314314
regex=u"".join("\\x%02x"%ord(c)forcincharacters)
315315
ifnotopposite:
316316
regex=u"^%s"%regex
317-
chars=charsUntilRegEx[characters]=re.compile(u"[%s]*"%regex)
317+
chars=charsUntilRegEx[(characters,opposite)]=re.compile(u"[%s]*"%regex)
318318

319319
whileTrue:
320320
# Find the longest matching prefix

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp