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

Commitabf1605

Browse files
committed
Restored Python 2.3 compatibility. Fixed typo of "certain".
--HG--extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401160
1 parent980e9ad commitabf1605

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/html5lib/inputstream.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, source, encoding=None, parseMeta=True, chardet=True):
4545
# List of where new lines occur
4646
self.newLines= [0]
4747

48-
self.charEncoding= (encoding,"certian")
48+
self.charEncoding= (encoding,"certain")
4949

5050
# Raw Stream - for unicode objects this will encode to utf-8 and set
5151
# self.charEncoding as appropriate
@@ -92,7 +92,7 @@ def openStream(self, source):
9292
# Otherwise treat source as a string and convert to a file object
9393
ifisinstance(source,unicode):
9494
source=source.encode('utf-8')
95-
self.charEncoding= ("utf-8","certian")
95+
self.charEncoding= ("utf-8","certain")
9696
importcStringIO
9797
stream=cStringIO.StringIO(str(source))
9898
returnstream
@@ -316,7 +316,7 @@ def charsUntil(self, characters, opposite = False):
316316
chars=charsUntilRegEx[(characters,opposite)]
317317
exceptKeyError:
318318
forcincharacters:assert(ord(c)<128)
319-
regex=u"".join("\\x%02x"%ord(c)forcincharacters)
319+
regex=u"".join(["\\x%02x"%ord(c)forcincharacters])
320320
ifnotopposite:
321321
regex=u"^%s"%regex
322322
chars=charsUntilRegEx[(characters,opposite)]=re.compile(u"[%s]*"%regex)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp