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

Commit4cb16fa

Browse files
committed
Added test for "--x>" not resetting the escape flag. Updated Python code to pass.
--HG--extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401132
1 parent10ce700 commit4cb16fa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/html5lib/tokenizer.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,14 @@ def dataState(self):
333333
# emitted separately.
334334
self.tokenQueue.append({"type":"SpaceCharacters","data":
335335
data+self.stream.charsUntil(spaceCharacters,True)})
336+
# No need to update lastFourChars here, since the first space will
337+
# have already broken any <!-- or --> sequences
336338
else:
339+
chars=self.stream.charsUntil(("&","<",">","-"))
337340
self.tokenQueue.append({"type":"Characters","data":
338-
data+self.stream.charsUntil(("&","<",">","-"))})
341+
data+chars})
342+
self.lastFourChars+=chars[-4:]
343+
self.lastFourChars=self.lastFourChars[-4:]
339344
returnTrue
340345

341346
defentityDataState(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp