html5 0.1.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +9 -2
- data/Manifest.txt +61 -2
- data/README +41 -5
- data/Rakefile.rb +22 -6
- data/{parse.rb → bin/html5} +11 -11
- data/lib/core_ext/string.rb +17 -0
- data/lib/html5/constants.rb +228 -0
- data/lib/html5/filters/iso639codes.rb +752 -0
- data/lib/html5/filters/rfc2046.rb +30 -0
- data/lib/html5/filters/rfc3987.rb +89 -0
- data/lib/html5/filters/validator.rb +830 -0
- data/lib/html5/html5parser.rb +25 -25
- data/lib/html5/html5parser/after_body_phase.rb +3 -3
- data/lib/html5/html5parser/after_frameset_phase.rb +3 -4
- data/lib/html5/html5parser/after_head_phase.rb +6 -6
- data/lib/html5/html5parser/before_head_phase.rb +1 -1
- data/lib/html5/html5parser/in_body_phase.rb +54 -48
- data/lib/html5/html5parser/in_caption_phase.rb +7 -6
- data/lib/html5/html5parser/in_cell_phase.rb +3 -3
- data/lib/html5/html5parser/in_column_group_phase.rb +1 -1
- data/lib/html5/html5parser/in_frameset_phase.rb +5 -5
- data/lib/html5/html5parser/in_head_phase.rb +10 -10
- data/lib/html5/html5parser/in_row_phase.rb +4 -2
- data/lib/html5/html5parser/in_select_phase.rb +7 -6
- data/lib/html5/html5parser/in_table_body_phase.rb +8 -5
- data/lib/html5/html5parser/in_table_phase.rb +12 -7
- data/lib/html5/html5parser/initial_phase.rb +5 -6
- data/lib/html5/html5parser/phase.rb +5 -9
- data/lib/html5/html5parser/root_element_phase.rb +1 -2
- data/lib/html5/html5parser/trailing_end_phase.rb +3 -3
- data/lib/html5/inputstream.rb +25 -31
- data/lib/html5/liberalxmlparser.rb +2 -2
- data/lib/html5/sanitizer.rb +6 -6
- data/lib/html5/serializer/htmlserializer.rb +2 -3
- data/lib/html5/sniffer.rb +45 -0
- data/lib/html5/tokenizer.rb +57 -59
- data/lib/html5/treebuilders/rexml.rb +7 -6
- data/lib/html5/treebuilders/simpletree.rb +1 -1
- data/lib/html5/treewalkers/base.rb +8 -0
- data/lib/html5/version.rb +3 -0
- data/testdata/encoding/chardet/test_big5.txt +51 -0
- data/testdata/encoding/test-yahoo-jp.dat +10 -0
- data/testdata/encoding/tests1.dat +394 -0
- data/testdata/encoding/tests2.dat +81 -0
- data/testdata/sanitizer/tests1.dat +416 -0
- data/testdata/serializer/core.test +104 -0
- data/testdata/serializer/injectmeta.test +65 -0
- data/testdata/serializer/optionaltags.test +900 -0
- data/testdata/serializer/options.test +60 -0
- data/testdata/serializer/whitespace.test +51 -0
- data/testdata/sites/google-results.htm +1 -0
- data/testdata/sites/python-ref-import.htm +1 -0
- data/testdata/sites/web-apps-old.htm +1 -0
- data/testdata/sites/web-apps.htm +34275 -0
- data/testdata/sniffer/htmlOrFeed.json +43 -0
- data/testdata/tokenizer/contentModelFlags.test +48 -0
- data/testdata/tokenizer/entities.test +2339 -0
- data/testdata/tokenizer/escapeFlag.test +21 -0
- data/testdata/tokenizer/test1.test +172 -0
- data/testdata/tokenizer/test2.test +129 -0
- data/testdata/tokenizer/test3.test +367 -0
- data/testdata/tokenizer/test4.test +198 -0
- data/testdata/tree-construction/tests1.dat +1950 -0
- data/testdata/tree-construction/tests2.dat +773 -0
- data/testdata/tree-construction/tests3.dat +270 -0
- data/testdata/tree-construction/tests4.dat +60 -0
- data/testdata/tree-construction/tests5.dat +175 -0
- data/testdata/tree-construction/tests6.dat +196 -0
- data/testdata/validator/attributes.test +1035 -0
- data/testdata/validator/base-href-attribute.test +787 -0
- data/testdata/validator/base-target-attribute.test +35 -0
- data/testdata/validator/blockquote-cite-attribute.test +7 -0
- data/testdata/validator/classattribute.test +152 -0
- data/testdata/validator/contenteditableattribute.test +59 -0
- data/testdata/validator/contextmenuattribute.test +115 -0
- data/testdata/validator/dirattribute.test +59 -0
- data/testdata/validator/draggableattribute.test +63 -0
- data/testdata/validator/html-xmlns-attribute.test +23 -0
- data/testdata/validator/idattribute.test +115 -0
- data/testdata/validator/inputattributes.test +2795 -0
- data/testdata/validator/irrelevantattribute.test +63 -0
- data/testdata/validator/langattribute.test +5579 -0
- data/testdata/validator/li-value-attribute.test +7 -0
- data/testdata/validator/link-href-attribute.test +7 -0
- data/testdata/validator/link-hreflang-attribute.test +7 -0
- data/testdata/validator/link-rel-attribute.test +271 -0
- data/testdata/validator/ol-start-attribute.test +7 -0
- data/testdata/validator/starttags.test +375 -0
- data/testdata/validator/style-scoped-attribute.test +7 -0
- data/testdata/validator/tabindexattribute.test +79 -0
- data/tests/preamble.rb +7 -17
- data/tests/test_encoding.rb +1 -1
- data/tests/test_lxp.rb +16 -0
- data/tests/test_parser.rb +2 -2
- data/tests/test_sniffer.rb +27 -0
- data/tests/test_treewalkers.rb +41 -22
- data/tests/test_validator.rb +31 -0
- metadata +65 -6
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{"tests": [
|
|
2
|
+
|
|
3
|
+
{"description": "valid tabindex attribute value '-1'",
|
|
4
|
+
"input": "<span tabindex=-1>",
|
|
5
|
+
"fail-if": "invalid-integer-value"},
|
|
6
|
+
|
|
7
|
+
{"description": "valid tabindex attribute value '0'",
|
|
8
|
+
"input": "<span tabindex=0>",
|
|
9
|
+
"fail-if": "invalid-integer-value"},
|
|
10
|
+
|
|
11
|
+
{"description": "valid tabindex attribute value '1'",
|
|
12
|
+
"input": "<span tabindex=1>",
|
|
13
|
+
"fail-if": "invalid-integer-value"},
|
|
14
|
+
|
|
15
|
+
{"description": "valid tabindex attribute value '32768'",
|
|
16
|
+
"input": "<span tabindex=32768>",
|
|
17
|
+
"fail-if": "invalid-integer-value"},
|
|
18
|
+
|
|
19
|
+
{"description": "valid tabindex attribute value '-32768'",
|
|
20
|
+
"input": "<span tabindex=-32768>",
|
|
21
|
+
"fail-if": "invalid-integer-value"},
|
|
22
|
+
|
|
23
|
+
{"description": "valid tabindex attribute value with leading spaces",
|
|
24
|
+
"input": "<span tabindex=' -32768'>",
|
|
25
|
+
"fail-if": "invalid-integer-value"},
|
|
26
|
+
|
|
27
|
+
{"description": "valid tabindex attribute value with trailing spaces",
|
|
28
|
+
"input": "<span tabindex='-32768 '>",
|
|
29
|
+
"fail-if": "invalid-integer-value"},
|
|
30
|
+
|
|
31
|
+
{"description": "valid tabindex attribute value with trailing junk",
|
|
32
|
+
"input": "<span tabindex='32768a'>",
|
|
33
|
+
"fail-if": "invalid-integer-value"},
|
|
34
|
+
|
|
35
|
+
{"description": "valid tabindex attribute value with trailing junk and whitespace",
|
|
36
|
+
"input": "<span tabindex='32768a '>",
|
|
37
|
+
"fail-if": "invalid-integer-value"},
|
|
38
|
+
|
|
39
|
+
{"description": "valid tabindex attribute value with trailing whitespace and junk",
|
|
40
|
+
"input": "<span tabindex='32768 a'>",
|
|
41
|
+
"fail-if": "invalid-integer-value"},
|
|
42
|
+
|
|
43
|
+
{"description": "valid tabindex attribute value with leading spaces",
|
|
44
|
+
"input": "<span tabindex=' 32768'>",
|
|
45
|
+
"fail-if": "invalid-integer-value"},
|
|
46
|
+
|
|
47
|
+
{"description": "valid tabindex attribute value with leading spaces (with sign)",
|
|
48
|
+
"input": "<span tabindex=' -32768'>",
|
|
49
|
+
"fail-if": "invalid-integer-value"},
|
|
50
|
+
|
|
51
|
+
{"description": "invalid tabindex attribute value (blank)",
|
|
52
|
+
"input": "<span tabindex>",
|
|
53
|
+
"fail-unless": "attribute-value-can-not-be-blank"},
|
|
54
|
+
|
|
55
|
+
{"description": "invalid tabindex attribute value due to leading junk",
|
|
56
|
+
"input": "<span tabindex=a1>",
|
|
57
|
+
"fail-unless": "invalid-integer-value"},
|
|
58
|
+
|
|
59
|
+
{"description": "invalid tabindex attribute value due to two hyphens",
|
|
60
|
+
"input": "<span tabindex=--1>",
|
|
61
|
+
"fail-unless": "invalid-integer-value"},
|
|
62
|
+
|
|
63
|
+
{"description": "invalid tabindex attribute value due to non-numeric",
|
|
64
|
+
"input": "<span tabindex=foo>",
|
|
65
|
+
"fail-unless": "invalid-integer-value"},
|
|
66
|
+
|
|
67
|
+
{"description": "invalid tabindex attribute value due to positive sign",
|
|
68
|
+
"input": "<span tabindex=+1>",
|
|
69
|
+
"fail-unless": "invalid-integer-value"},
|
|
70
|
+
|
|
71
|
+
{"description": "invalid tabindex attribute value due to decimal point",
|
|
72
|
+
"input": "<span tabindex=.1>",
|
|
73
|
+
"fail-unless": "invalid-integer-value"},
|
|
74
|
+
|
|
75
|
+
{"description": "valid tabindex attribute value with trailing decimal point",
|
|
76
|
+
"input": "<span tabindex=1.0>",
|
|
77
|
+
"fail-if": "invalid-integer-value"}
|
|
78
|
+
|
|
79
|
+
]}
|
data/tests/preamble.rb
CHANGED
|
@@ -8,28 +8,18 @@ else
|
|
|
8
8
|
TESTDATA_DIR = File.join(File.dirname(File.dirname(File.expand_path(__FILE__))), 'testdata')
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
$:.unshift File.join(File.dirname(File.dirname(__FILE__)),'lib')
|
|
11
|
+
# $:.unshift File.join(File.dirname(File.dirname(__FILE__)), 'lib')
|
|
12
12
|
|
|
13
|
-
$:.unshift File.dirname(__FILE__)
|
|
13
|
+
# $:.unshift File.dirname(__FILE__)
|
|
14
|
+
|
|
15
|
+
require 'core_ext/string'
|
|
14
16
|
|
|
15
17
|
def html5_test_files(subdirectory)
|
|
16
18
|
Dir[File.join(TESTDATA_DIR, subdirectory, '*.*')]
|
|
17
19
|
end
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
require 'json'
|
|
22
|
-
rescue LoadError
|
|
23
|
-
class JSON
|
|
24
|
-
def self.parse json
|
|
25
|
-
json.gsub!(/\$/, "\\$")
|
|
26
|
-
json.gsub!(/"\s*:/, '"=>')
|
|
27
|
-
json.gsub!(/\\u[0-9a-fA-F]{4}/) {|x| [x[2..-1].to_i(16)].pack('U')}
|
|
28
|
-
null = nil
|
|
29
|
-
eval json
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
21
|
+
require 'rubygems'
|
|
22
|
+
require 'json'
|
|
33
23
|
|
|
34
24
|
module HTML5
|
|
35
25
|
module TestSupport
|
|
@@ -54,7 +44,7 @@ module HTML5
|
|
|
54
44
|
|
|
55
45
|
def each
|
|
56
46
|
data = {}
|
|
57
|
-
key=nil
|
|
47
|
+
key = nil
|
|
58
48
|
@f.each_line do |line|
|
|
59
49
|
if line[0] == ?# and @sections.include?(line[1..-2])
|
|
60
50
|
heading = line[1..-2]
|
data/tests/test_encoding.rb
CHANGED
|
@@ -10,7 +10,7 @@ class Html5EncodingTestCase < Test::Unit::TestCase
|
|
|
10
10
|
require 'rubygems'
|
|
11
11
|
require 'UniversalDetector'
|
|
12
12
|
|
|
13
|
-
def test_chardet
|
|
13
|
+
def test_chardet #TODO: can we get rid of this?
|
|
14
14
|
file = File.open(File.join(TESTDATA_DIR, 'encoding', 'chardet', 'test_big5.txt'), 'r')
|
|
15
15
|
stream = HTML5::HTMLInputStream.new(file, :chardet => true)
|
|
16
16
|
assert_equal 'big5', stream.char_encoding.downcase
|
data/tests/test_lxp.rb
CHANGED
|
@@ -257,6 +257,22 @@ EOX1
|
|
|
257
257
|
<head><title>PROLOG</title></head>
|
|
258
258
|
<body>
|
|
259
259
|
</body></html>
|
|
260
|
+
EOX2
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
def test_tagsoup
|
|
264
|
+
assert_xhtml_equal <<EOX1, <<EOX2.strip
|
|
265
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
266
|
+
<head><title>TAGSOUP</title></head>
|
|
267
|
+
<body>
|
|
268
|
+
<u><blockquote><p></u>
|
|
269
|
+
</body></html>
|
|
270
|
+
EOX1
|
|
271
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
272
|
+
<head><title>TAGSOUP</title></head>
|
|
273
|
+
<body>
|
|
274
|
+
<u/><blockquote><u/><p><u/>
|
|
275
|
+
</p></blockquote></body></html>
|
|
260
276
|
EOX2
|
|
261
277
|
end
|
|
262
278
|
|
data/tests/test_parser.rb
CHANGED
|
@@ -50,8 +50,8 @@ class Html5ParserTestCase < Test::Unit::TestCase
|
|
|
50
50
|
'', 'Recieved:', actual_output
|
|
51
51
|
].join("\n")
|
|
52
52
|
|
|
53
|
-
actual_errors = parser.errors.map do |(line, col), message|
|
|
54
|
-
'Line: %i Col: %i %s' % [line, col, message]
|
|
53
|
+
actual_errors = parser.errors.map do |(line, col), message, datavars|
|
|
54
|
+
'Line: %i Col: %i %s' % [line, col, E[message] % datavars]
|
|
55
55
|
end
|
|
56
56
|
assert_equal errors.length, parser.errors.length, [
|
|
57
57
|
'', 'Input', input,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require File.join(File.dirname(__FILE__), 'preamble')
|
|
2
|
+
require "html5/sniffer"
|
|
3
|
+
|
|
4
|
+
class TestFeedTypeSniffer < Test::Unit::TestCase
|
|
5
|
+
include HTML5
|
|
6
|
+
include TestSupport
|
|
7
|
+
include Sniffer
|
|
8
|
+
|
|
9
|
+
html5_test_files('sniffer').each do |test_file|
|
|
10
|
+
test_name = File.basename(test_file).sub('.test', '')
|
|
11
|
+
|
|
12
|
+
tests = JSON.parse(File.read(test_file))
|
|
13
|
+
|
|
14
|
+
tests.each_with_index do |data, index|
|
|
15
|
+
define_method('test_%s_%d' % [test_name, index + 1]) do
|
|
16
|
+
assert_equal data['type'], html_or_feed(data['input'])
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
# each_with_index do |t, i|
|
|
21
|
+
# define_method "test_#{i}" do
|
|
22
|
+
# assert_equal t[0], sniff_feed_type(t[1])
|
|
23
|
+
# end
|
|
24
|
+
# end
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
end
|
data/tests/test_treewalkers.rb
CHANGED
|
@@ -47,31 +47,29 @@ class TestTreeWalkers < Test::Unit::TestCase
|
|
|
47
47
|
indent = 0
|
|
48
48
|
concatenateCharacterTokens(tokens) do |token|
|
|
49
49
|
case token[:type]
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
else
|
|
66
|
-
output << "#{' '*indent}<!DOCTYPE >"
|
|
67
|
-
end
|
|
68
|
-
when :Characters, :SpaceCharacters
|
|
69
|
-
output << "#{' '*indent}\"#{token[:data]}\""
|
|
50
|
+
when :StartTag, :EmptyTag
|
|
51
|
+
output << "#{' '*indent}<#{token[:name]}>"
|
|
52
|
+
indent += 2
|
|
53
|
+
for name, value in token[:data].to_a.sort
|
|
54
|
+
next if name=='xmlns'
|
|
55
|
+
output << "#{' '*indent}#{name}=\"#{value}\""
|
|
56
|
+
end
|
|
57
|
+
indent -= 2 if token[:type] == :EmptyTag
|
|
58
|
+
when :EndTag
|
|
59
|
+
indent -= 2
|
|
60
|
+
when :Comment
|
|
61
|
+
output << "#{' '*indent}<!-- #{token[:data]} -->"
|
|
62
|
+
when :Doctype
|
|
63
|
+
if token[:name] and token[:name].any?
|
|
64
|
+
output << "#{' '*indent}<!DOCTYPE #{token[:name]}>"
|
|
70
65
|
else
|
|
71
|
-
|
|
66
|
+
output << "#{' '*indent}<!DOCTYPE >"
|
|
67
|
+
end
|
|
68
|
+
when :Characters, :SpaceCharacters
|
|
69
|
+
output << "#{' '*indent}\"#{token[:data]}\""
|
|
72
70
|
end
|
|
73
71
|
end
|
|
74
|
-
|
|
72
|
+
output.join("\n")
|
|
75
73
|
end
|
|
76
74
|
|
|
77
75
|
html5_test_files('tree-construction').each do |test_file|
|
|
@@ -113,4 +111,25 @@ class TestTreeWalkers < Test::Unit::TestCase
|
|
|
113
111
|
end
|
|
114
112
|
end
|
|
115
113
|
end
|
|
114
|
+
|
|
115
|
+
def test_all_tokens
|
|
116
|
+
expected = [
|
|
117
|
+
{:data => [], :type => :StartTag, :name => 'html'},
|
|
118
|
+
{:data => [], :type => :StartTag, :name => 'head'},
|
|
119
|
+
{:data => [], :type => :EndTag, :name => 'head'},
|
|
120
|
+
{:data => [], :type => :StartTag, :name => 'body'},
|
|
121
|
+
{:data => [], :type => :EndTag, :name => 'body'},
|
|
122
|
+
{:data => [], :type => :EndTag, :name => 'html'}]
|
|
123
|
+
for treeName, tree_class in $tree_types_to_test
|
|
124
|
+
p = HTML5::HTMLParser.new(:tree => tree_class[:builder])
|
|
125
|
+
document = p.parse("<html></html>")
|
|
126
|
+
# document = tree_class.get(:adapter)(document)
|
|
127
|
+
output = tree_class[:walker].new(document)
|
|
128
|
+
expected.zip(output) do |expected_token, output_token|
|
|
129
|
+
assert_equal(expected_token, output_token)
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
|
|
116
135
|
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env ruby -wKU
|
|
2
|
+
|
|
3
|
+
require File.join(File.dirname(__FILE__), 'preamble')
|
|
4
|
+
|
|
5
|
+
require 'html5'
|
|
6
|
+
require 'html5/filters/validator'
|
|
7
|
+
|
|
8
|
+
class TestValidator < Test::Unit::TestCase
|
|
9
|
+
def run_validator_test(test)
|
|
10
|
+
p = HTML5::HTMLParser.new(:tokenizer => HTMLConformanceChecker)
|
|
11
|
+
p.parse(test['input'])
|
|
12
|
+
errorCodes = p.errors.collect{|e| e[1]}
|
|
13
|
+
if test.has_key?('fail-if')
|
|
14
|
+
assert !errorCodes.include?(test['fail-if'])
|
|
15
|
+
end
|
|
16
|
+
if test.has_key?('fail-unless')
|
|
17
|
+
assert errorCodes.include?(test['fail-unless'])
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
for filename in html5_test_files('validator')
|
|
22
|
+
tests = JSON.load(open(filename))
|
|
23
|
+
testName = File.basename(filename).sub(".test", "")
|
|
24
|
+
tests['tests'].each_with_index do |test, index|
|
|
25
|
+
define_method "test_#{testName}_#{index}" do
|
|
26
|
+
run_validator_test(test)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
metadata
CHANGED
|
@@ -3,15 +3,15 @@ rubygems_version: 0.9.2
|
|
|
3
3
|
specification_version: 1
|
|
4
4
|
name: html5
|
|
5
5
|
version: !ruby/object:Gem::Version
|
|
6
|
-
version: 0.
|
|
7
|
-
date: 2007-08
|
|
6
|
+
version: 0.10.0
|
|
7
|
+
date: 2007-10-08 00:00:00 -07:00
|
|
8
8
|
summary: HTML5 parser/tokenizer.
|
|
9
9
|
require_paths:
|
|
10
10
|
- lib
|
|
11
11
|
email: ryan@theryanking.com
|
|
12
12
|
homepage: http://code.google.com/p/html5lib
|
|
13
13
|
rubyforge_project: html5
|
|
14
|
-
description: A ruby
|
|
14
|
+
description: "A ruby implementation of the parsing algorithm in HTML5. == FEATURES/PROBLEMS: == SYNOPSIS: TODO"
|
|
15
15
|
autorequire:
|
|
16
16
|
default_executable:
|
|
17
17
|
bindir: bin
|
|
@@ -33,12 +33,18 @@ files:
|
|
|
33
33
|
- Manifest.txt
|
|
34
34
|
- README
|
|
35
35
|
- Rakefile.rb
|
|
36
|
+
- bin/html5
|
|
37
|
+
- lib/core_ext/string.rb
|
|
36
38
|
- lib/html5.rb
|
|
37
39
|
- lib/html5/constants.rb
|
|
38
40
|
- lib/html5/filters/base.rb
|
|
39
41
|
- lib/html5/filters/inject_meta_charset.rb
|
|
42
|
+
- lib/html5/filters/iso639codes.rb
|
|
40
43
|
- lib/html5/filters/optionaltags.rb
|
|
44
|
+
- lib/html5/filters/rfc2046.rb
|
|
45
|
+
- lib/html5/filters/rfc3987.rb
|
|
41
46
|
- lib/html5/filters/sanitizer.rb
|
|
47
|
+
- lib/html5/filters/validator.rb
|
|
42
48
|
- lib/html5/filters/whitespace.rb
|
|
43
49
|
- lib/html5/html5parser.rb
|
|
44
50
|
- lib/html5/html5parser/after_body_phase.rb
|
|
@@ -65,6 +71,7 @@ files:
|
|
|
65
71
|
- lib/html5/serializer.rb
|
|
66
72
|
- lib/html5/serializer/htmlserializer.rb
|
|
67
73
|
- lib/html5/serializer/xhtmlserializer.rb
|
|
74
|
+
- lib/html5/sniffer.rb
|
|
68
75
|
- lib/html5/tokenizer.rb
|
|
69
76
|
- lib/html5/treebuilders.rb
|
|
70
77
|
- lib/html5/treebuilders/base.rb
|
|
@@ -76,16 +83,68 @@ files:
|
|
|
76
83
|
- lib/html5/treewalkers/hpricot.rb
|
|
77
84
|
- lib/html5/treewalkers/rexml.rb
|
|
78
85
|
- lib/html5/treewalkers/simpletree.rb
|
|
79
|
-
-
|
|
86
|
+
- lib/html5/version.rb
|
|
87
|
+
- testdata/encoding/chardet/test_big5.txt
|
|
88
|
+
- testdata/encoding/test-yahoo-jp.dat
|
|
89
|
+
- testdata/encoding/tests1.dat
|
|
90
|
+
- testdata/encoding/tests2.dat
|
|
91
|
+
- testdata/sanitizer/tests1.dat
|
|
92
|
+
- testdata/serializer/core.test
|
|
93
|
+
- testdata/serializer/injectmeta.test
|
|
94
|
+
- testdata/serializer/optionaltags.test
|
|
95
|
+
- testdata/serializer/options.test
|
|
96
|
+
- testdata/serializer/whitespace.test
|
|
97
|
+
- testdata/sites/google-results.htm
|
|
98
|
+
- testdata/sites/python-ref-import.htm
|
|
99
|
+
- testdata/sites/web-apps-old.htm
|
|
100
|
+
- testdata/sites/web-apps.htm
|
|
101
|
+
- testdata/sniffer/htmlOrFeed.json
|
|
102
|
+
- testdata/tokenizer/contentModelFlags.test
|
|
103
|
+
- testdata/tokenizer/entities.test
|
|
104
|
+
- testdata/tokenizer/escapeFlag.test
|
|
105
|
+
- testdata/tokenizer/test1.test
|
|
106
|
+
- testdata/tokenizer/test2.test
|
|
107
|
+
- testdata/tokenizer/test3.test
|
|
108
|
+
- testdata/tokenizer/test4.test
|
|
109
|
+
- testdata/tree-construction/tests1.dat
|
|
110
|
+
- testdata/tree-construction/tests2.dat
|
|
111
|
+
- testdata/tree-construction/tests3.dat
|
|
112
|
+
- testdata/tree-construction/tests4.dat
|
|
113
|
+
- testdata/tree-construction/tests5.dat
|
|
114
|
+
- testdata/tree-construction/tests6.dat
|
|
115
|
+
- testdata/validator/attributes.test
|
|
116
|
+
- testdata/validator/base-href-attribute.test
|
|
117
|
+
- testdata/validator/base-target-attribute.test
|
|
118
|
+
- testdata/validator/blockquote-cite-attribute.test
|
|
119
|
+
- testdata/validator/classattribute.test
|
|
120
|
+
- testdata/validator/contenteditableattribute.test
|
|
121
|
+
- testdata/validator/contextmenuattribute.test
|
|
122
|
+
- testdata/validator/dirattribute.test
|
|
123
|
+
- testdata/validator/draggableattribute.test
|
|
124
|
+
- testdata/validator/html-xmlns-attribute.test
|
|
125
|
+
- testdata/validator/idattribute.test
|
|
126
|
+
- testdata/validator/inputattributes.test
|
|
127
|
+
- testdata/validator/irrelevantattribute.test
|
|
128
|
+
- testdata/validator/langattribute.test
|
|
129
|
+
- testdata/validator/li-value-attribute.test
|
|
130
|
+
- testdata/validator/link-href-attribute.test
|
|
131
|
+
- testdata/validator/link-hreflang-attribute.test
|
|
132
|
+
- testdata/validator/link-rel-attribute.test
|
|
133
|
+
- testdata/validator/ol-start-attribute.test
|
|
134
|
+
- testdata/validator/starttags.test
|
|
135
|
+
- testdata/validator/style-scoped-attribute.test
|
|
136
|
+
- testdata/validator/tabindexattribute.test
|
|
80
137
|
- tests/preamble.rb
|
|
81
138
|
- tests/test_encoding.rb
|
|
82
139
|
- tests/test_lxp.rb
|
|
83
140
|
- tests/test_parser.rb
|
|
84
141
|
- tests/test_sanitizer.rb
|
|
85
142
|
- tests/test_serializer.rb
|
|
143
|
+
- tests/test_sniffer.rb
|
|
86
144
|
- tests/test_stream.rb
|
|
87
145
|
- tests/test_tokenizer.rb
|
|
88
146
|
- tests/test_treewalkers.rb
|
|
147
|
+
- tests/test_validator.rb
|
|
89
148
|
- tests/tokenizer_test_parser.rb
|
|
90
149
|
test_files: []
|
|
91
150
|
|
|
@@ -93,8 +152,8 @@ rdoc_options: []
|
|
|
93
152
|
|
|
94
153
|
extra_rdoc_files: []
|
|
95
154
|
|
|
96
|
-
executables:
|
|
97
|
-
|
|
155
|
+
executables:
|
|
156
|
+
- html5
|
|
98
157
|
extensions: []
|
|
99
158
|
|
|
100
159
|
requirements: []
|