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

Commit61c7700

Browse files
committed
Fix test output for missing public or system id
1 parent5976856 commit61c7700

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

‎src/html5lib/treewalkers/_base.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def comment(self, data):
6060
defdoctype(self,name,publicId=None,systemId=None,correct=True):
6161
return {"type":"Doctype",
6262
"name":nameisnotNoneandunicode(name)oru"",
63-
"publicId":publicId,"systemId":systemId,
63+
"publicId":publicId,
64+
"systemId":systemId,
6465
"correct":correct}
6566

6667
defunknown(self,nodeType):

‎tests/test_treewalkers.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,14 @@ def convertTokens(tokens):
196196
output.append("%s<!-- %s -->"% (" "*indent,token["data"]))
197197
eliftype=="Doctype":
198198
iftoken["name"]:
199-
iftoken["publicId"]ortoken["systemId"]:
199+
iftoken["publicId"]:
200200
output.append("""%s<!DOCTYPE %s "%s" "%s">"""%
201201
(" "*indent,token["name"],
202202
token["publicId"],
203+
token["systemId"]andtoken["systemId"]or""))
204+
eliftoken["systemId"]:
205+
output.append("""%s<!DOCTYPE %s SYSTEM "%s">"""%
206+
(" "*indent,token["name"],
203207
token["systemId"]))
204208
else:
205209
output.append("%s<!DOCTYPE %s>"%(" "*indent,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp