Skip to content

Commit 400c636

Browse files
committed
HTML: remove spaces around <title> tag
1 parent f50b46a commit 400c636

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

html/html_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ func TestHTML(t *testing.T) {
3333
{`<style><!--\ncss\n--></style>`, `<style><!--\ncss\n--></style>`},
3434
{`<style>&</style>`, `<style>&</style>`},
3535
{`<html><head></head><body>x</body></html>`, `x`},
36+
{"<html><head><title> a </title>\n<link></head></html>", `<title>a</title><link>`},
3637
{`<meta http-equiv="content-type" content="text/html; charset=utf-8">`, `<meta charset=utf-8>`},
3738
{`<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />`, `<meta charset=utf-8>`},
3839
{`<meta http-equiv=" content-type " content=" text/html; charset=utf-8 ">`, `<meta charset=utf-8>`},

html/table.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ var tagMap = map[Hash]traits{
125125
Th: blockTag,
126126
Thead: blockTag,
127127
Time: normalTag,
128-
Title: normalTag,
128+
Title: blockTag,
129129
Tr: blockTag,
130130
Track: normalTag,
131131
U: normalTag,

0 commit comments

Comments
 (0)