Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Given this source document:
<!DOCTYPE html>
<title>Edward O’Connor</title>
<link rel=openid.server href=http://www.myopenid.com/server>
<link rel=openid.delegate href=http://hober.myopenid.com>
<h1>Edward O’Connor</h1>
<p>Hi, I’m Ted.
The code generates (a longer version of) this document:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Edward O’Connor</title>
<link href="http://www.myopenid.com/server" rel="openid.server">
<link href="http://hober.myopenid.com" rel="openid.delegate">
<link rel="stylesheet" href="/css/default.css">
</head>
<body>
<h1>Edward O’Connor</h1>
<p>Hi, I’m Ted.
</p>
</body>
</html>
But if I add <html> .. </html> around the contents of the source file:
<!DOCTYPE html>
<html>
<title>Edward O’Connor</title>
<link rel=openid.server href=http://www.myopenid.com/server>
<link rel=openid.delegate href=http://hober.myopenid.com>
<h1>Edward O’Connor</h1>
<p>Hi, I’m Ted.
</html>
I see this instead (note the placement of some <link> tags):
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Edward O’Connor</title>
<link rel="stylesheet" href="/css/default.css">
</head>
<body>
<link href="http://www.myopenid.com/server" rel="openid.server">
<link href="http://hober.myopenid.com" rel="openid.delegate">
<h1>Edward O’Connor</h1>
<p>Hi, I’m Ted.
</p>
</body>
</html>
@hober

This comment has been minimized.

Copy link
Owner Author

hober commented Oct 13, 2010

DEBUG: 'tokenizer.state=' 'data_state'
DEBUG: 'parser.newPhase' 'initial'
DEBUG: 'tokenizer.state=' 'tag_open_state'
DEBUG: 'tokenizer.state=' 'markup_declaration_open_state'
DEBUG: 'tokenizer.state=' 'doctype_state'
DEBUG: 'tokenizer.state=' 'before_doctype_name_state'
DEBUG: 'tokenizer.state=' 'doctype_name_state'
DEBUG: 'parser.newPhase' 'beforeHTML'
DEBUG: 'tokenizer.state=' 'data_state'
DEBUG: 'tokenizer.state=' 'data_state'
DEBUG: 'tokenizer.state=' 'tag_open_state'
DEBUG: 'tokenizer.state=' 'tag_name_state'
DEBUG: 'parser.newPhase' 'beforeHead'
DEBUG: 'tokenizer.state=' 'data_state'
DEBUG: 'parser.newPhase' 'inHead'
DEBUG: 'parser.newPhase' 'afterHead'
DEBUG: 'parser.newPhase' 'inBody'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.