html-to-markdown 2.24.6 → 2.25.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.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/ext/html-to-markdown-rb/native/Cargo.lock +3 -26
  4. data/ext/html-to-markdown-rb/native/Cargo.toml +1 -1
  5. data/lib/html_to_markdown/version.rb +1 -1
  6. data/rust-vendor/html-to-markdown-rs/Cargo.toml +0 -1
  7. data/rust-vendor/html-to-markdown-rs/src/converter/main_helpers.rs +1 -1
  8. data/rust-vendor/html-to-markdown-rs/src/lib.rs +1 -0
  9. data/rust-vendor/{markup5ever_rcdom/lib.rs → html-to-markdown-rs/src/rcdom.rs} +53 -91
  10. data/rust-vendor/png/.cargo-checksum.json +1 -1
  11. data/rust-vendor/png/.cargo_vcs_info.json +1 -1
  12. data/rust-vendor/png/CHANGES.md +44 -0
  13. data/rust-vendor/png/Cargo.lock +124 -171
  14. data/rust-vendor/png/Cargo.toml +1 -1
  15. data/rust-vendor/png/Cargo.toml.orig +1 -1
  16. data/rust-vendor/png/benches/expand_paletted.rs +5 -5
  17. data/rust-vendor/png/benches/unfilter.rs +3 -3
  18. data/rust-vendor/png/src/adam7.rs +17 -10
  19. data/rust-vendor/png/src/common.rs +8 -8
  20. data/rust-vendor/png/src/decoder/mod.rs +53 -20
  21. data/rust-vendor/png/src/decoder/stream.rs +263 -78
  22. data/rust-vendor/png/src/decoder/unfiltering_buffer.rs +210 -53
  23. data/rust-vendor/png/src/decoder/zlib.rs +130 -90
  24. data/rust-vendor/png/src/encoder.rs +4 -2
  25. data/rust-vendor/png/src/{filter.rs → filter/mod.rs} +100 -367
  26. data/rust-vendor/png/src/filter/optimization-notes.md +104 -0
  27. data/rust-vendor/png/src/filter/paeth.rs +398 -0
  28. data/rust-vendor/png/src/filter/simd.rs +308 -0
  29. data/rust-vendor/png/src/lib.rs +1 -0
  30. metadata +7 -177
  31. data/rust-vendor/markup5ever_rcdom/.cargo-checksum.json +0 -1
  32. data/rust-vendor/markup5ever_rcdom/.cargo_vcs_info.json +0 -7
  33. data/rust-vendor/markup5ever_rcdom/Cargo.lock +0 -658
  34. data/rust-vendor/markup5ever_rcdom/Cargo.toml +0 -109
  35. data/rust-vendor/markup5ever_rcdom/Cargo.toml.orig +0 -42
  36. data/rust-vendor/markup5ever_rcdom/LICENSE-APACHE +0 -201
  37. data/rust-vendor/markup5ever_rcdom/LICENSE-MIT +0 -25
  38. data/rust-vendor/markup5ever_rcdom/README.md +0 -7
  39. data/rust-vendor/markup5ever_rcdom/custom-html5lib-tokenizer-tests/regression.test +0 -69
  40. data/rust-vendor/markup5ever_rcdom/data/test/ignore +0 -1
  41. data/rust-vendor/markup5ever_rcdom/examples/hello_xml.rs +0 -39
  42. data/rust-vendor/markup5ever_rcdom/examples/html2html.rs +0 -51
  43. data/rust-vendor/markup5ever_rcdom/examples/print-rcdom.rs +0 -78
  44. data/rust-vendor/markup5ever_rcdom/examples/xml_tree_printer.rs +0 -67
  45. data/rust-vendor/markup5ever_rcdom/html5lib-tests/.gitattributes +0 -2
  46. data/rust-vendor/markup5ever_rcdom/html5lib-tests/.github/workflows/downstream.yml +0 -76
  47. data/rust-vendor/markup5ever_rcdom/html5lib-tests/.github/workflows/lint.yml +0 -25
  48. data/rust-vendor/markup5ever_rcdom/html5lib-tests/.gitignore +0 -79
  49. data/rust-vendor/markup5ever_rcdom/html5lib-tests/AUTHORS.rst +0 -34
  50. data/rust-vendor/markup5ever_rcdom/html5lib-tests/LICENSE +0 -21
  51. data/rust-vendor/markup5ever_rcdom/html5lib-tests/encoding/chardet/test_big5.txt +0 -51
  52. data/rust-vendor/markup5ever_rcdom/html5lib-tests/encoding/scripted/tests1.dat +0 -5
  53. data/rust-vendor/markup5ever_rcdom/html5lib-tests/encoding/test-yahoo-jp.dat +0 -10
  54. data/rust-vendor/markup5ever_rcdom/html5lib-tests/encoding/tests1.dat +0 -388
  55. data/rust-vendor/markup5ever_rcdom/html5lib-tests/encoding/tests2.dat +0 -115
  56. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint +0 -6
  57. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/__init__.py +0 -0
  58. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/__init__.py +0 -0
  59. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/funcparserlib/LICENSE +0 -18
  60. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/funcparserlib/__init__.py +0 -0
  61. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/funcparserlib/lexer.py +0 -211
  62. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/funcparserlib/lexer.pyi +0 -34
  63. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/funcparserlib/parser.py +0 -872
  64. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/funcparserlib/parser.pyi +0 -83
  65. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/funcparserlib/py.typed +0 -0
  66. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/funcparserlib/util.py +0 -72
  67. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/funcparserlib/util.pyi +0 -7
  68. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor/vendor.txt +0 -1
  69. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/_vendor-patches/funcparserlib.patch +0 -24
  70. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/lint.py +0 -280
  71. data/rust-vendor/markup5ever_rcdom/html5lib-tests/lint_lib/parser.py +0 -177
  72. data/rust-vendor/markup5ever_rcdom/html5lib-tests/pyproject.toml +0 -7
  73. data/rust-vendor/markup5ever_rcdom/html5lib-tests/serializer/core.test +0 -125
  74. data/rust-vendor/markup5ever_rcdom/html5lib-tests/serializer/injectmeta.test +0 -66
  75. data/rust-vendor/markup5ever_rcdom/html5lib-tests/serializer/optionaltags.test +0 -965
  76. data/rust-vendor/markup5ever_rcdom/html5lib-tests/serializer/options.test +0 -60
  77. data/rust-vendor/markup5ever_rcdom/html5lib-tests/serializer/whitespace.test +0 -51
  78. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/README.md +0 -107
  79. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/contentModelFlags.test +0 -93
  80. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/domjs.test +0 -335
  81. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/entities.test +0 -542
  82. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/escapeFlag.test +0 -36
  83. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/namedEntities.test +0 -42422
  84. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/numericEntities.test +0 -1677
  85. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/pendingSpecChanges.test +0 -9
  86. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/test1.test +0 -353
  87. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/test2.test +0 -275
  88. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/test3.test +0 -11233
  89. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/test4.test +0 -532
  90. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/unicodeChars.test +0 -1577
  91. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/unicodeCharsProblematic.test +0 -41
  92. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tokenizer/xmlViolation.test +0 -20
  93. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/README.md +0 -108
  94. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/adoption01.dat +0 -354
  95. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/adoption02.dat +0 -39
  96. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/blocks.dat +0 -695
  97. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/comments01.dat +0 -217
  98. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/doctype01.dat +0 -474
  99. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/domjs-unsafe.dat +0 -0
  100. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/entities01.dat +0 -943
  101. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/entities02.dat +0 -309
  102. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/foreign-fragment.dat +0 -645
  103. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/html5test-com.dat +0 -301
  104. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/inbody01.dat +0 -54
  105. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/isindex.dat +0 -49
  106. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/main-element.dat +0 -46
  107. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/math.dat +0 -104
  108. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/menuitem-element.dat +0 -240
  109. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/namespace-sensitivity.dat +0 -22
  110. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/noscript01.dat +0 -237
  111. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/pending-spec-changes-plain-text-unsafe.dat +0 -0
  112. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/pending-spec-changes.dat +0 -46
  113. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/plain-text-unsafe.dat +0 -0
  114. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/quirks01.dat +0 -53
  115. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/ruby.dat +0 -302
  116. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/scriptdata01.dat +0 -372
  117. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/scripted/adoption01.dat +0 -16
  118. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/scripted/ark.dat +0 -27
  119. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/scripted/webkit01.dat +0 -30
  120. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/search-element.dat +0 -46
  121. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/svg.dat +0 -104
  122. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tables01.dat +0 -322
  123. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/template.dat +0 -1673
  124. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests1.dat +0 -1956
  125. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests10.dat +0 -849
  126. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests11.dat +0 -523
  127. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests12.dat +0 -62
  128. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests14.dat +0 -75
  129. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests15.dat +0 -216
  130. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests16.dat +0 -2602
  131. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests17.dat +0 -179
  132. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests18.dat +0 -558
  133. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests19.dat +0 -1398
  134. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests2.dat +0 -831
  135. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests20.dat +0 -842
  136. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests21.dat +0 -306
  137. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests22.dat +0 -190
  138. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests23.dat +0 -168
  139. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests24.dat +0 -79
  140. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests25.dat +0 -288
  141. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests26.dat +0 -453
  142. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests3.dat +0 -305
  143. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests4.dat +0 -74
  144. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests5.dat +0 -210
  145. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests6.dat +0 -663
  146. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests7.dat +0 -453
  147. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests8.dat +0 -165
  148. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests9.dat +0 -472
  149. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tests_innerHTML_1.dat +0 -843
  150. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/tricky01.dat +0 -336
  151. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/webkit01.dat +0 -785
  152. data/rust-vendor/markup5ever_rcdom/html5lib-tests/tree-construction/webkit02.dat +0 -554
  153. data/rust-vendor/markup5ever_rcdom/tests/foreach_html5lib_test/mod.rs +0 -41
  154. data/rust-vendor/markup5ever_rcdom/tests/html-driver.rs +0 -29
  155. data/rust-vendor/markup5ever_rcdom/tests/html-serializer.rs +0 -265
  156. data/rust-vendor/markup5ever_rcdom/tests/html-tokenizer.rs +0 -487
  157. data/rust-vendor/markup5ever_rcdom/tests/html-tree-builder.rs +0 -298
  158. data/rust-vendor/markup5ever_rcdom/tests/html-tree-sink.rs +0 -141
  159. data/rust-vendor/markup5ever_rcdom/tests/util/find_tests.rs +0 -34
  160. data/rust-vendor/markup5ever_rcdom/tests/util/runner.rs +0 -48
  161. data/rust-vendor/markup5ever_rcdom/tests/xml-driver.rs +0 -101
  162. data/rust-vendor/markup5ever_rcdom/tests/xml-tokenizer.rs +0 -374
  163. data/rust-vendor/markup5ever_rcdom/tests/xml-tree-builder.rs +0 -237
  164. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/AUTHORS.rst +0 -9
  165. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/LICENSE +0 -21
  166. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/README.md +0 -92
  167. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/comments.test +0 -274
  168. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/doctype.test +0 -3232
  169. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/entities.test +0 -283
  170. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/eof.test +0 -113
  171. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/namedEntities.test +0 -42210
  172. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/numericEntities.test +0 -1349
  173. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/test1.test +0 -162
  174. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/test2.test +0 -64
  175. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tokenizer/unicodeChars.test +0 -1295
  176. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tree-construction/README.md +0 -104
  177. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tree-construction/namespace.dat +0 -119
  178. data/rust-vendor/markup5ever_rcdom/xml5lib-tests/tree-construction/test1.dat +0 -124
  179. data/rust-vendor/xml5ever/.cargo-checksum.json +0 -1
  180. data/rust-vendor/xml5ever/.cargo_vcs_info.json +0 -6
  181. data/rust-vendor/xml5ever/Cargo.lock +0 -752
  182. data/rust-vendor/xml5ever/Cargo.toml +0 -69
  183. data/rust-vendor/xml5ever/Cargo.toml.orig +0 -29
  184. data/rust-vendor/xml5ever/LICENSE-APACHE +0 -201
  185. data/rust-vendor/xml5ever/LICENSE-MIT +0 -25
  186. data/rust-vendor/xml5ever/README.md +0 -72
  187. data/rust-vendor/xml5ever/benches/xml5ever.rs +0 -77
  188. data/rust-vendor/xml5ever/data/bench/strong.xml +0 -1
  189. data/rust-vendor/xml5ever/examples/README.md +0 -223
  190. data/rust-vendor/xml5ever/examples/example.xml +0 -3
  191. data/rust-vendor/xml5ever/examples/simple_xml_tokenizer.rs +0 -81
  192. data/rust-vendor/xml5ever/examples/xml_tokenizer.rs +0 -115
  193. data/rust-vendor/xml5ever/src/driver.rs +0 -90
  194. data/rust-vendor/xml5ever/src/lib.rs +0 -47
  195. data/rust-vendor/xml5ever/src/macros.rs +0 -18
  196. data/rust-vendor/xml5ever/src/serialize/mod.rs +0 -216
  197. data/rust-vendor/xml5ever/src/tokenizer/char_ref/mod.rs +0 -456
  198. data/rust-vendor/xml5ever/src/tokenizer/interface.rs +0 -116
  199. data/rust-vendor/xml5ever/src/tokenizer/mod.rs +0 -1344
  200. data/rust-vendor/xml5ever/src/tokenizer/qname.rs +0 -84
  201. data/rust-vendor/xml5ever/src/tokenizer/states.rs +0 -167
  202. data/rust-vendor/xml5ever/src/tree_builder/mod.rs +0 -774
  203. data/rust-vendor/xml5ever/src/tree_builder/types.rs +0 -37
@@ -1,554 +0,0 @@
1
- #data
2
- <foo bar=qux/>
3
- #errors
4
- (1,14): expected-doctype-but-got-start-tag
5
- (1,14): expected-closing-tag-but-got-eof
6
- #document
7
- | <html>
8
- | <head>
9
- | <body>
10
- | <foo>
11
- | bar="qux/"
12
-
13
- #data
14
- <p id="status"><noscript><strong>A</strong></noscript><span>B</span></p>
15
- #errors
16
- (1,15): expected-doctype-but-got-start-tag
17
- #script-on
18
- #document
19
- | <html>
20
- | <head>
21
- | <body>
22
- | <p>
23
- | id="status"
24
- | <noscript>
25
- | "<strong>A</strong>"
26
- | <span>
27
- | "B"
28
-
29
- #data
30
- <p id="status"><noscript><strong>A</strong></noscript><span>B</span></p>
31
- #errors
32
- (1,15): expected-doctype-but-got-start-tag
33
- #script-off
34
- #document
35
- | <html>
36
- | <head>
37
- | <body>
38
- | <p>
39
- | id="status"
40
- | <noscript>
41
- | <strong>
42
- | "A"
43
- | <span>
44
- | "B"
45
-
46
- #data
47
- <div><sarcasm><div></div></sarcasm></div>
48
- #errors
49
- (1,5): expected-doctype-but-got-start-tag
50
- #document
51
- | <html>
52
- | <head>
53
- | <body>
54
- | <div>
55
- | <sarcasm>
56
- | <div>
57
-
58
- #data
59
- <html><body><img src="" border="0" alt="><div>A</div></body></html>
60
- #errors
61
- (1,6): expected-doctype-but-got-start-tag
62
- (1,67): eof-in-attribute-value-double-quote
63
- #new-errors
64
- (1:68) eof-in-tag
65
- #document
66
- | <html>
67
- | <head>
68
- | <body>
69
-
70
- #data
71
- <table><td></tbody>A
72
- #errors
73
- (1,7): expected-doctype-but-got-start-tag
74
- (1,11): unexpected-cell-in-table-body
75
- (1,20): foster-parenting-character
76
- (1,20): eof-in-table
77
- #document
78
- | <html>
79
- | <head>
80
- | <body>
81
- | "A"
82
- | <table>
83
- | <tbody>
84
- | <tr>
85
- | <td>
86
-
87
- #data
88
- <table><td></thead>A
89
- #errors
90
- (1,7): expected-doctype-but-got-start-tag
91
- (1,11): unexpected-cell-in-table-body
92
- (1,19): XXX-undefined-error
93
- (1,20): expected-closing-tag-but-got-eof
94
- #document
95
- | <html>
96
- | <head>
97
- | <body>
98
- | <table>
99
- | <tbody>
100
- | <tr>
101
- | <td>
102
- | "A"
103
-
104
- #data
105
- <table><td></tfoot>A
106
- #errors
107
- (1,7): expected-doctype-but-got-start-tag
108
- (1,11): unexpected-cell-in-table-body
109
- (1,19): XXX-undefined-error
110
- (1,20): expected-closing-tag-but-got-eof
111
- #document
112
- | <html>
113
- | <head>
114
- | <body>
115
- | <table>
116
- | <tbody>
117
- | <tr>
118
- | <td>
119
- | "A"
120
-
121
- #data
122
- <table><thead><td></tbody>A
123
- #errors
124
- (1,7): expected-doctype-but-got-start-tag
125
- (1,18): unexpected-cell-in-table-body
126
- (1,26): XXX-undefined-error
127
- (1,27): expected-closing-tag-but-got-eof
128
- #document
129
- | <html>
130
- | <head>
131
- | <body>
132
- | <table>
133
- | <thead>
134
- | <tr>
135
- | <td>
136
- | "A"
137
-
138
- #data
139
- <legend>test</legend>
140
- #errors
141
- (1,7): expected-doctype-but-got-start-tag
142
- #document
143
- | <html>
144
- | <head>
145
- | <body>
146
- | <legend>
147
- | "test"
148
-
149
- #data
150
- <table><input>
151
- #errors
152
- (1,7): expected-doctype-but-got-start-tag
153
- (1,14): foster-parenting-start-tag
154
- (1,15): expected-closing-tag-but-got-eof
155
- #document
156
- | <html>
157
- | <head>
158
- | <body>
159
- | <input>
160
- | <table>
161
-
162
- #data
163
- <b><em><dcell><postfield><postfield><postfield><postfield><missing_glyph><missing_glyph><missing_glyph><missing_glyph><hkern><aside></b></em>
164
- #errors
165
- unexpected-b-end-tag
166
- unexpected-em-end-tag
167
- eof-in-aside
168
- #document-fragment
169
- div
170
- #document
171
- | <b>
172
- | <em>
173
- | <dcell>
174
- | <postfield>
175
- | <postfield>
176
- | <postfield>
177
- | <postfield>
178
- | <missing_glyph>
179
- | <missing_glyph>
180
- | <missing_glyph>
181
- | <missing_glyph>
182
- | <hkern>
183
- | <aside>
184
- | <b>
185
-
186
- #data
187
- <b><em><foo><foo><aside></b>
188
- #errors
189
- (1,3): expected-doctype-but-got-start-tag
190
- (1,28): adoption-agency-9
191
- (1,29): expected-closing-tag-but-got-eof
192
- #document
193
- | <html>
194
- | <head>
195
- | <body>
196
- | <b>
197
- | <em>
198
- | <foo>
199
- | <foo>
200
- | <em>
201
- | <aside>
202
- | <b>
203
-
204
- #data
205
- <b><em><foo><foo><aside></b></em>
206
- #errors
207
- (1,3): expected-doctype-but-got-start-tag
208
- (1,28): adoption-agency-9
209
- (1,33): adoption-agency-9
210
- (1,34): expected-closing-tag-but-got-eof
211
- #document
212
- | <html>
213
- | <head>
214
- | <body>
215
- | <b>
216
- | <em>
217
- | <foo>
218
- | <foo>
219
- | <em>
220
- | <aside>
221
- | <em>
222
- | <b>
223
-
224
- #data
225
- <b><em><foo><foo><foo><aside></b>
226
- #errors
227
- (1,3): expected-doctype-but-got-start-tag
228
- (1,33): adoption-agency-9
229
- (1,34): expected-closing-tag-but-got-eof
230
- #document
231
- | <html>
232
- | <head>
233
- | <body>
234
- | <b>
235
- | <em>
236
- | <foo>
237
- | <foo>
238
- | <foo>
239
- | <aside>
240
- | <b>
241
-
242
- #data
243
- <b><em><foo><foo><foo><aside></b></em>
244
- #errors
245
- (1,3): expected-doctype-but-got-start-tag
246
- (1,33): adoption-agency-9
247
- (1,38): adoption-agency-9
248
- (1,39): expected-closing-tag-but-got-eof
249
- #document
250
- | <html>
251
- | <head>
252
- | <body>
253
- | <b>
254
- | <em>
255
- | <foo>
256
- | <foo>
257
- | <foo>
258
- | <aside>
259
- | <b>
260
-
261
- #data
262
- <b><em><foo><foo><foo><foo><foo><foo><foo><foo><foo><foo><aside></b></em>
263
- #errors
264
- (1,68): adoption-agency-9
265
- (1,73): adoption-agency-9
266
- (1,74): expected-closing-tag-but-got-eof
267
- #document-fragment
268
- div
269
- #document
270
- | <b>
271
- | <em>
272
- | <foo>
273
- | <foo>
274
- | <foo>
275
- | <foo>
276
- | <foo>
277
- | <foo>
278
- | <foo>
279
- | <foo>
280
- | <foo>
281
- | <foo>
282
- | <aside>
283
- | <b>
284
-
285
- #data
286
- <b><em><foo><foob><foob><foob><foob><fooc><fooc><fooc><fooc><food><aside></b></em>
287
- #errors
288
- (1,77): adoption-agency-9
289
- (1,82): adoption-agency-9
290
- (1,83): expected-closing-tag-but-got-eof
291
- #document-fragment
292
- div
293
- #document
294
- | <b>
295
- | <em>
296
- | <foo>
297
- | <foob>
298
- | <foob>
299
- | <foob>
300
- | <foob>
301
- | <fooc>
302
- | <fooc>
303
- | <fooc>
304
- | <fooc>
305
- | <food>
306
- | <aside>
307
- | <b>
308
-
309
- #data
310
- <option><XH<optgroup></optgroup>
311
- #errors
312
- (1,21): unexpected-start-tag-in-select
313
- (1,32): unexpected-end-tag-in-select
314
- #document-fragment
315
- select
316
- #document
317
- | <option>
318
-
319
- #data
320
- <svg><foreignObject><div>foo</div><plaintext></foreignObject></svg><div>bar</div>
321
- #errors
322
- (1,5): expected-doctype-but-got-start-tag
323
- (1,82): expected-closing-tag-but-got-eof
324
- #document
325
- | <html>
326
- | <head>
327
- | <body>
328
- | <svg svg>
329
- | <svg foreignObject>
330
- | <div>
331
- | "foo"
332
- | <plaintext>
333
- | "</foreignObject></svg><div>bar</div>"
334
-
335
- #data
336
- <svg><foreignObject></foreignObject><title></svg>foo
337
- #errors
338
- (1,5): expected-doctype-but-got-start-tag
339
- (1,49): expected-one-end-tag-but-got-another
340
- #document
341
- | <html>
342
- | <head>
343
- | <body>
344
- | <svg svg>
345
- | <svg foreignObject>
346
- | <svg title>
347
- | "foo"
348
-
349
- #data
350
- </foreignObject><plaintext><div>foo</div>
351
- #errors
352
- (1,16): expected-doctype-but-got-end-tag
353
- (1,16): unexpected-end-tag-before-html
354
- (1,42): expected-closing-tag-but-got-eof
355
- #document
356
- | <html>
357
- | <head>
358
- | <body>
359
- | <plaintext>
360
- | "<div>foo</div>"
361
-
362
- #data
363
- <svg xml:base xml:lang xml:space xml:baaah definitionurl>
364
- #errors
365
- no-doctype
366
- eof-in-svg
367
- #document
368
- | <html>
369
- | <head>
370
- | <body>
371
- | <svg svg>
372
- | definitionurl=""
373
- | xml lang=""
374
- | xml space=""
375
- | xml:baaah=""
376
- | xml:base=""
377
-
378
- #data
379
- <math definitionurl xlink:title xlink:show>
380
- #errors
381
- no-doctype
382
- eof-in-math
383
- #document
384
- | <html>
385
- | <head>
386
- | <body>
387
- | <math math>
388
- | definitionURL=""
389
- | xlink show=""
390
- | xlink title=""
391
-
392
- #data
393
- <math DEFINITIONURL>
394
- #errors
395
- no-doctype
396
- eof-in-math
397
- #document
398
- | <html>
399
- | <head>
400
- | <body>
401
- | <math math>
402
- | definitionURL=""
403
-
404
- #data
405
- <select><hr>
406
- #errors
407
- 1:1: ERROR: Expected a doctype token
408
- 1:13: ERROR: Premature end of file. Currently open tags: html, body, select.
409
- #document
410
- | <html>
411
- | <head>
412
- | <body>
413
- | <select>
414
- | <hr>
415
-
416
- #data
417
- <select><option><hr>
418
- #errors
419
- 1:1: ERROR: Expected a doctype token
420
- 1:21: ERROR: Premature end of file. Currently open tags: html, body, select.
421
- #document
422
- | <html>
423
- | <head>
424
- | <body>
425
- | <select>
426
- | <option>
427
- | <hr>
428
-
429
- #data
430
- <select><optgroup><option><hr>
431
- #errors
432
- 1:1: ERROR: Expected a doctype token
433
- 1:31: ERROR: Premature end of file. Currently open tags: html, body, select.
434
- #document
435
- | <html>
436
- | <head>
437
- | <body>
438
- | <select>
439
- | <optgroup>
440
- | <option>
441
- | <hr>
442
-
443
- #data
444
- <select><optgroup><hr>
445
- #errors
446
- 1:1: ERROR: Expected a doctype token
447
- 1:23: ERROR: Premature end of file. Currently open tags: html, body, select.
448
- #document
449
- | <html>
450
- | <head>
451
- | <body>
452
- | <select>
453
- | <optgroup>
454
- | <hr>
455
-
456
- #data
457
- <select><option><optgroup><hr>
458
- #errors
459
- 1:1: ERROR: Expected a doctype token
460
- 1:31: ERROR: Premature end of file. Currently open tags: html, body, select.
461
- #document
462
- | <html>
463
- | <head>
464
- | <body>
465
- | <select>
466
- | <option>
467
- | <optgroup>
468
- | <hr>
469
-
470
- #data
471
- <table><tr><td><select><hr>
472
- #errors
473
- 1:1: ERROR: Expected a doctype token
474
- 1:28: ERROR: Premature end of file. Currently open tags: html, body, table, tbody, tr, td, select.
475
- #document
476
- | <html>
477
- | <head>
478
- | <body>
479
- | <table>
480
- | <tbody>
481
- | <tr>
482
- | <td>
483
- | <select>
484
- | <hr>
485
-
486
- #data
487
- <table><tr><td><select><option><hr>
488
- #errors
489
- 1:1: ERROR: Expected a doctype token
490
- 1:36: ERROR: Premature end of file. Currently open tags: html, body, table, tbody, tr, td, select.
491
- #document
492
- | <html>
493
- | <head>
494
- | <body>
495
- | <table>
496
- | <tbody>
497
- | <tr>
498
- | <td>
499
- | <select>
500
- | <option>
501
- | <hr>
502
-
503
- #data
504
- <table><tr><td><select><optgroup><option><hr>
505
- #errors
506
- 1:1: ERROR: Expected a doctype token
507
- 1:46: ERROR: Premature end of file. Currently open tags: html, body, table, tbody, tr, td, select.
508
- #document
509
- | <html>
510
- | <head>
511
- | <body>
512
- | <table>
513
- | <tbody>
514
- | <tr>
515
- | <td>
516
- | <select>
517
- | <optgroup>
518
- | <option>
519
- | <hr>
520
-
521
- #data
522
- <table><tr><td><select><optgroup><hr>
523
- #errors
524
- 1:1: ERROR: Expected a doctype token
525
- 1:38: ERROR: Premature end of file. Currently open tags: html, body, table, tbody, tr, td, select.
526
- #document
527
- | <html>
528
- | <head>
529
- | <body>
530
- | <table>
531
- | <tbody>
532
- | <tr>
533
- | <td>
534
- | <select>
535
- | <optgroup>
536
- | <hr>
537
-
538
- #data
539
- <table><tr><td><select><option><optgroup><hr>
540
- #errors
541
- 1:1: ERROR: Expected a doctype token
542
- 1:46: ERROR: Premature end of file. Currently open tags: html, body, table, tbody, tr, td, select.
543
- #document
544
- | <html>
545
- | <head>
546
- | <body>
547
- | <table>
548
- | <tbody>
549
- | <tr>
550
- | <td>
551
- | <select>
552
- | <option>
553
- | <optgroup>
554
- | <hr>
@@ -1,41 +0,0 @@
1
- // Copyright 2014-2017 The html5ever Project Developers. See the
2
- // COPYRIGHT file at the top-level directory of this distribution.
3
- //
4
- // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5
- // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6
- // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7
- // option. This file may not be copied, modified, or distributed
8
- // except according to those terms.
9
-
10
- use std::ffi::OsStr;
11
- use std::fs;
12
- use std::ops::FnMut;
13
- use std::path::Path;
14
-
15
- pub fn foreach_html5lib_test<Mk>(
16
- src_dir: &Path,
17
- subdir: &'static str,
18
- ext: &'static OsStr,
19
- mut mk: Mk,
20
- ) where
21
- Mk: FnMut(&Path, fs::File),
22
- {
23
- let mut test_dir_path = src_dir.to_path_buf();
24
- test_dir_path.push(subdir);
25
-
26
- let maybe_test_files = fs::read_dir(&test_dir_path);
27
- match maybe_test_files {
28
- Ok(test_files) => {
29
- for entry in test_files {
30
- let path = entry.unwrap().path();
31
- if path.extension() == Some(ext) {
32
- let file = fs::File::open(&path).unwrap();
33
- mk(&path, file);
34
- }
35
- }
36
- },
37
- Err(_) => {
38
- panic!("Before launching the tests, please run this command:\n\n\tgit submodule update --init\n\nto retrieve an html5lib-tests snapshot.");
39
- },
40
- }
41
- }
@@ -1,29 +0,0 @@
1
- use html5ever::driver;
2
- use html5ever::serialize;
3
- use html5ever::tendril::TendrilSink;
4
- use markup5ever_rcdom::{RcDom, SerializableHandle};
5
-
6
- #[test]
7
- fn from_utf8() {
8
- let dom = driver::parse_document(RcDom::default(), Default::default())
9
- .from_utf8()
10
- .one("<title>Test".as_bytes());
11
- let mut serialized = Vec::new();
12
- let document: SerializableHandle = dom.document.clone().into();
13
- serialize::serialize(&mut serialized, &document, Default::default()).unwrap();
14
- assert_eq!(
15
- String::from_utf8(serialized).unwrap().replace(' ', ""),
16
- "<html><head><title>Test</title></head><body></body></html>"
17
- );
18
- }
19
-
20
- #[test]
21
- fn many_templates() {
22
- let mut body = String::new();
23
- for _ in 1..10000 {
24
- body.push_str("<template>");
25
- }
26
- let _ = driver::parse_document(RcDom::default(), Default::default())
27
- .from_utf8()
28
- .one(body.as_bytes());
29
- }