Skip to content

Commit 8a45f44

Browse files
committed
Tests cases for previous.
1 parent 0d72ca3 commit 8a45f44

File tree

8 files changed

+135
-0
lines changed

8 files changed

+135
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<template>
5+
<tr>
6+
<td>1</td>
7+
</tr>
8+
</template>
9+
<template>
10+
<td>1</td>
11+
</template>
12+
<template>
13+
<li>1</li>
14+
</template>
15+
<title></title>
16+
</head>
17+
<body>
18+
</body>
19+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
2+
line 1 column 1 - Warning: inserting missing 'title' element
3+
Info: Document content looks like HTML5
4+
Tidy found 2 warnings and 0 errors!
5+
6+
About HTML Tidy: https://github.com/htacg/tidy-html5
7+
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
8+
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
9+
Latest HTML specification: https://html.spec.whatwg.org/multipage/
10+
Validate your HTML documents: https://validator.w3.org/nu/
11+
Lobby your company to join the W3C: https://www.w3.org/Consortium
12+
13+
Do you speak a language other than English, or a different variant of
14+
English? Consider helping us to localize HTML Tidy. For details please see
15+
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Issue #611-1</title>
6+
</head>
7+
<body>
8+
<template>
9+
<tr>
10+
<td>1</td>
11+
</tr>
12+
</template>
13+
</body>
14+
</html>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Info: Document content looks like HTML5
2+
No warnings or errors were found.
3+
4+
About HTML Tidy: https://github.com/htacg/tidy-html5
5+
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
6+
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
7+
Latest HTML specification: https://html.spec.whatwg.org/multipage/
8+
Validate your HTML documents: https://validator.w3.org/nu/
9+
Lobby your company to join the W3C: https://www.w3.org/Consortium
10+
11+
Do you speak a language other than English, or a different variant of
12+
English? Consider helping us to localize HTML Tidy. For details please see
13+
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Issue #611-2d</title>
6+
<script>
7+
// Data is hard-coded here, but could come from the server
8+
var data = [
9+
{ name: 'Pillar', color: 'Ticked Tabby', sex: 'Female (neutered)', legs: 3 },
10+
{ name: 'Hedral', color: 'Tuxedo', sex: 'Male (neutered)', legs: 4 },
11+
];
12+
</script>
13+
</head>
14+
<body>
15+
<script>
16+
var template = document.querySelector('#row');
17+
for (var i = 0; i < data.length; i += 1) {
18+
var cat = data[i];
19+
var clone = template.content.cloneNode(true);
20+
var cells = clone.querySelectorAll('td');
21+
cells[0].textContent = cat.name;
22+
cells[1].textContent = cat.color;
23+
cells[2].textContent = cat.sex;
24+
cells[3].textContent = cat.legs;
25+
template.parentNode.appendChild(clone);
26+
}
27+
</script>
28+
<template id="row">
29+
<tr>
30+
<td></td>
31+
<td></td>
32+
<td></td>
33+
<td></td>
34+
</tr>
35+
</template>
36+
<table>
37+
<thead>
38+
<tr>
39+
<th>Name</th>
40+
<th>Color</th>
41+
<th>Sex</th>
42+
<th>Legs</th>
43+
</tr>
44+
</thead>
45+
</table>
46+
</body>
47+
</html>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
line 20 column 3 - Warning: <template> isn't allowed in <tbody> elements
2+
line 19 column 2 - Info: <tbody> previously mentioned
3+
line 22 column 3 - Warning: discarding unexpected </template>
4+
line 23 column 1 - Warning: discarding unexpected </table>
5+
line 24 column 1 - Warning: <script> isn't allowed in <tr> elements
6+
line 21 column 4 - Info: <tr> previously mentioned
7+
line 20 column 3 - Warning: missing </template>
8+
line 15 column 1 - Warning: missing </table>
9+
line 19 column 2 - Warning: trimming empty <tbody>
10+
Info: Document content looks like HTML5
11+
Tidy found 7 warnings and 0 errors!
12+
13+
One or more empty elements were present in the source document but
14+
dropped on output. If these elements are necessary or you don't want
15+
this behavior, then consider setting the option "drop-empty-elements"
16+
to no.
17+
18+
About HTML Tidy: https://github.com/htacg/tidy-html5
19+
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
20+
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
21+
Latest HTML specification: https://html.spec.whatwg.org/multipage/
22+
Validate your HTML documents: https://validator.w3.org/nu/
23+
Lobby your company to join the W3C: https://www.w3.org/Consortium
24+
25+
Do you speak a language other than English, or a different variant of
26+
English? Consider helping us to localize HTML Tidy. For details please see
27+
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md

0 commit comments

Comments
 (0)