html-to-markdown 3.10.6 → 3.11.2
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.
- checksums.yaml +4 -4
- data/README.md +8 -3
- data/ext/html_to_markdown_rb/Cargo.lock +78 -79
- data/ext/html_to_markdown_rb/Cargo.toml +33 -7
- data/ext/html_to_markdown_rb/native/Cargo.lock +35 -74
- data/ext/html_to_markdown_rb/native/Cargo.toml +18 -2
- data/ext/html_to_markdown_rb/native/extconf.rb +5 -0
- data/ext/html_to_markdown_rb/src/lib.rs +268 -245
- data/lib/html_to_markdown/native.rb +206 -108
- data/lib/html_to_markdown/version.rb +3 -3
- data/lib/html_to_markdown.rb +2 -2
- data/lib/html_to_markdown_rb.so +0 -0
- data/sig/types.rbs +298 -301
- metadata +2 -2
data/sig/types.rbs
CHANGED
|
@@ -1,376 +1,373 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:e6f791251806bd44f13bfb0ace5c19ca9043291d0a9168044506f4b30cc5d7cc
|
|
3
3
|
# To regenerate: alef generate
|
|
4
|
-
# To verify freshness: alef verify
|
|
4
|
+
# To verify freshness: alef verify
|
|
5
5
|
|
|
6
6
|
module HtmlToMarkdown
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def initialize: (?title: String, ?description: String, ?keywords: Array[String], ?author: String, ?canonical_url: String, ?base_href: String, ?language: String, ?text_direction: TextDirection, ?open_graph: Hash[String, String], ?twitter_card: Hash[String, String], ?meta_tags: Hash[String, String]) -> void
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
8
|
+
VERSION: String
|
|
9
|
+
|
|
10
|
+
type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
|
|
11
|
+
|
|
12
|
+
class DocumentMetadata
|
|
13
|
+
attr_reader title: String?
|
|
14
|
+
attr_reader description: String?
|
|
15
|
+
attr_reader keywords: Array[String]
|
|
16
|
+
attr_reader author: String?
|
|
17
|
+
attr_reader canonical_url: String?
|
|
18
|
+
attr_reader base_href: String?
|
|
19
|
+
attr_reader language: String?
|
|
20
|
+
attr_reader text_direction: TextDirection?
|
|
21
|
+
attr_reader open_graph: Hash[String, String]
|
|
22
|
+
attr_reader twitter_card: Hash[String, String]
|
|
23
|
+
attr_reader meta_tags: Hash[String, String]
|
|
24
|
+
|
|
25
|
+
def initialize: (?title: String, ?description: String, ?keywords: Array[String], ?author: String, ?canonical_url: String, ?base_href: String, ?language: String, ?text_direction: TextDirection, ?open_graph: Hash[String, String], ?twitter_card: Hash[String, String], ?meta_tags: Hash[String, String]) -> void
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class HeaderMetadata
|
|
29
|
+
attr_reader level: Integer
|
|
30
|
+
attr_reader text: String
|
|
31
|
+
attr_reader id: String?
|
|
32
|
+
attr_reader depth: Integer
|
|
33
|
+
attr_reader html_offset: Integer
|
|
34
34
|
|
|
35
35
|
def initialize: (level: Integer, text: String, ?id: String, depth: Integer, html_offset: Integer) -> void
|
|
36
36
|
def is_valid: () -> bool
|
|
37
|
-
|
|
37
|
+
end
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
class LinkMetadata
|
|
40
|
+
attr_reader href: String
|
|
41
|
+
attr_reader text: String
|
|
42
|
+
attr_reader title: String?
|
|
43
|
+
attr_reader link_type: LinkType
|
|
44
44
|
attr_reader rel: Array[String]
|
|
45
45
|
attr_reader attributes: Hash[String, String]
|
|
46
46
|
|
|
47
|
-
def initialize: (href: String, text: String, ?title: String, link_type: LinkType, rel: Array[String], attributes: Hash[String, String]) -> void
|
|
48
|
-
|
|
47
|
+
def initialize: (href: String, text: String, ?title: String, link_type: LinkType, rel: Array[String], attributes: Hash[String, String]) -> void
|
|
48
|
+
end
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
class ImageMetadata
|
|
51
|
+
attr_reader src: String
|
|
52
|
+
attr_reader alt: String?
|
|
53
|
+
attr_reader title: String?
|
|
54
|
+
attr_reader dimensions: ImageDimensions?
|
|
55
|
+
attr_reader image_type: ImageType
|
|
56
56
|
attr_reader attributes: Hash[String, String]
|
|
57
57
|
|
|
58
|
-
def initialize: (src: String, ?alt: String, ?title: String, ?dimensions: ImageDimensions, image_type: ImageType, attributes: Hash[String, String]) -> void
|
|
59
|
-
|
|
58
|
+
def initialize: (src: String, ?alt: String, ?title: String, ?dimensions: ImageDimensions, image_type: ImageType, attributes: Hash[String, String]) -> void
|
|
59
|
+
end
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
class StructuredData
|
|
62
|
+
attr_reader data_type: StructuredDataType
|
|
63
|
+
attr_reader raw_json: String
|
|
64
|
+
attr_reader schema_type: String?
|
|
65
65
|
|
|
66
66
|
def initialize: (data_type: StructuredDataType, raw_json: String, ?schema_type: String) -> void
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def initialize: (?document: DocumentMetadata, ?headers: Array[HeaderMetadata], ?links: Array[LinkMetadata], ?images: Array[ImageMetadata], ?structured_data: Array[StructuredData]) -> void
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
def initialize: (?heading_style: HeadingStyle, ?list_indent_type: ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: NewlineStyle, ?code_block_style: CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: UrlEscapeStyle, ?link_style: LinkStyle, ?output_format: OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: TierStrategy, ?visitor: VisitorHandle) -> void
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
attr_accessor remove_forms: bool?
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
class HtmlMetadata
|
|
70
|
+
attr_reader document: DocumentMetadata
|
|
71
|
+
attr_reader headers: Array[HeaderMetadata]
|
|
72
|
+
attr_reader links: Array[LinkMetadata]
|
|
73
|
+
attr_reader images: Array[ImageMetadata]
|
|
74
|
+
attr_reader structured_data: Array[StructuredData]
|
|
75
|
+
|
|
76
|
+
def initialize: (?document: DocumentMetadata, ?headers: Array[HeaderMetadata], ?links: Array[LinkMetadata], ?images: Array[ImageMetadata], ?structured_data: Array[StructuredData]) -> void
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
class ConversionOptions
|
|
80
|
+
attr_reader heading_style: HeadingStyle
|
|
81
|
+
attr_reader list_indent_type: ListIndentType
|
|
82
|
+
attr_reader list_indent_width: Integer
|
|
83
|
+
attr_reader bullets: String
|
|
84
|
+
attr_reader strong_em_symbol: String
|
|
85
|
+
attr_reader escape_asterisks: bool
|
|
86
|
+
attr_reader escape_underscores: bool
|
|
87
|
+
attr_reader escape_misc: bool
|
|
88
|
+
attr_reader escape_ascii: bool
|
|
89
|
+
attr_reader code_language: String
|
|
90
|
+
attr_reader autolinks: bool
|
|
91
|
+
attr_reader default_title: bool
|
|
92
|
+
attr_reader br_in_tables: bool
|
|
93
|
+
attr_reader compact_tables: bool
|
|
94
|
+
attr_reader highlight_style: HighlightStyle
|
|
95
|
+
attr_reader extract_metadata: bool
|
|
96
|
+
attr_reader whitespace_mode: WhitespaceMode
|
|
97
|
+
attr_reader strip_newlines: bool
|
|
98
|
+
attr_reader wrap: bool
|
|
99
|
+
attr_reader wrap_width: Integer
|
|
100
|
+
attr_reader convert_as_inline: bool
|
|
101
|
+
attr_reader sub_symbol: String
|
|
102
|
+
attr_reader sup_symbol: String
|
|
103
|
+
attr_reader newline_style: NewlineStyle
|
|
104
|
+
attr_reader code_block_style: CodeBlockStyle
|
|
105
|
+
attr_reader keep_inline_images_in: Array[String]
|
|
106
|
+
attr_reader preprocessing: PreprocessingOptions
|
|
107
|
+
attr_reader encoding: String
|
|
108
|
+
attr_reader debug: bool
|
|
109
|
+
attr_reader strip_tags: Array[String]
|
|
110
|
+
attr_reader preserve_tags: Array[String]
|
|
111
|
+
attr_reader skip_images: bool
|
|
112
|
+
attr_reader url_escape_style: UrlEscapeStyle
|
|
113
|
+
attr_reader link_style: LinkStyle
|
|
114
|
+
attr_reader output_format: OutputFormat
|
|
115
|
+
attr_reader include_document_structure: bool
|
|
116
|
+
attr_reader extract_images: bool
|
|
117
|
+
attr_reader max_image_size: Integer
|
|
118
|
+
attr_reader capture_svg: bool
|
|
119
|
+
attr_reader infer_dimensions: bool
|
|
120
|
+
attr_reader max_depth: Integer?
|
|
121
|
+
attr_reader exclude_selectors: Array[String]
|
|
122
|
+
attr_reader tier_strategy: TierStrategy
|
|
123
|
+
attr_reader visitor: VisitorHandle?
|
|
124
|
+
|
|
125
|
+
def initialize: (?heading_style: HeadingStyle, ?list_indent_type: ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: NewlineStyle, ?code_block_style: CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: UrlEscapeStyle, ?link_style: LinkStyle, ?output_format: OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: TierStrategy, ?visitor: VisitorHandle) -> void
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
class ConversionOptionsUpdate
|
|
129
|
+
attr_reader heading_style: HeadingStyle?
|
|
130
|
+
attr_reader list_indent_type: ListIndentType?
|
|
131
|
+
attr_reader list_indent_width: Integer?
|
|
132
|
+
attr_reader bullets: String?
|
|
133
|
+
attr_reader strong_em_symbol: String?
|
|
134
|
+
attr_reader escape_asterisks: bool?
|
|
135
|
+
attr_reader escape_underscores: bool?
|
|
136
|
+
attr_reader escape_misc: bool?
|
|
137
|
+
attr_reader escape_ascii: bool?
|
|
138
|
+
attr_reader code_language: String?
|
|
139
|
+
attr_reader autolinks: bool?
|
|
140
|
+
attr_reader default_title: bool?
|
|
141
|
+
attr_reader br_in_tables: bool?
|
|
142
|
+
attr_reader compact_tables: bool?
|
|
143
|
+
attr_reader highlight_style: HighlightStyle?
|
|
144
|
+
attr_reader extract_metadata: bool?
|
|
145
|
+
attr_reader whitespace_mode: WhitespaceMode?
|
|
146
|
+
attr_reader strip_newlines: bool?
|
|
147
|
+
attr_reader wrap: bool?
|
|
148
|
+
attr_reader wrap_width: Integer?
|
|
149
|
+
attr_reader convert_as_inline: bool?
|
|
150
|
+
attr_reader sub_symbol: String?
|
|
151
|
+
attr_reader sup_symbol: String?
|
|
152
|
+
attr_reader newline_style: NewlineStyle?
|
|
153
|
+
attr_reader code_block_style: CodeBlockStyle?
|
|
154
|
+
attr_reader keep_inline_images_in: Array[String]?
|
|
155
|
+
attr_reader preprocessing: PreprocessingOptionsUpdate?
|
|
156
|
+
attr_reader encoding: String?
|
|
157
|
+
attr_reader debug: bool?
|
|
158
|
+
attr_reader strip_tags: Array[String]?
|
|
159
|
+
attr_reader preserve_tags: Array[String]?
|
|
160
|
+
attr_reader skip_images: bool?
|
|
161
|
+
attr_reader url_escape_style: UrlEscapeStyle?
|
|
162
|
+
attr_reader link_style: LinkStyle?
|
|
163
|
+
attr_reader output_format: OutputFormat?
|
|
164
|
+
attr_reader include_document_structure: bool?
|
|
165
|
+
attr_reader extract_images: bool?
|
|
166
|
+
attr_reader max_image_size: Integer?
|
|
167
|
+
attr_reader capture_svg: bool?
|
|
168
|
+
attr_reader infer_dimensions: bool?
|
|
169
|
+
attr_reader max_depth: Integer?
|
|
170
|
+
attr_reader exclude_selectors: Array[String]?
|
|
171
|
+
attr_reader tier_strategy: TierStrategy?
|
|
172
|
+
attr_reader visitor: VisitorHandle?
|
|
173
|
+
|
|
174
|
+
def initialize: (?heading_style: HeadingStyle, ?list_indent_type: ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: NewlineStyle, ?code_block_style: CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptionsUpdate, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?url_escape_style: UrlEscapeStyle, ?link_style: LinkStyle, ?output_format: OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer?, ?exclude_selectors: Array[String], ?tier_strategy: TierStrategy, ?visitor: VisitorHandle) -> void
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
class PreprocessingOptions
|
|
178
|
+
attr_reader enabled: bool
|
|
179
|
+
attr_reader preset: PreprocessingPreset
|
|
180
|
+
attr_reader remove_navigation: bool
|
|
181
|
+
attr_reader remove_forms: bool
|
|
183
182
|
|
|
184
183
|
def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
|
|
185
|
-
|
|
186
|
-
end
|
|
184
|
+
end
|
|
187
185
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
186
|
+
class PreprocessingOptionsUpdate
|
|
187
|
+
attr_reader enabled: bool?
|
|
188
|
+
attr_reader preset: PreprocessingPreset?
|
|
189
|
+
attr_reader remove_navigation: bool?
|
|
190
|
+
attr_reader remove_forms: bool?
|
|
193
191
|
|
|
194
192
|
def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
|
|
195
|
-
|
|
193
|
+
end
|
|
196
194
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
195
|
+
class ImageDimensions
|
|
196
|
+
attr_reader width: Integer
|
|
197
|
+
attr_reader height: Integer
|
|
200
198
|
|
|
201
199
|
def initialize: (width: Integer, height: Integer) -> void
|
|
202
|
-
|
|
200
|
+
end
|
|
203
201
|
|
|
204
|
-
|
|
202
|
+
class DocumentStructure
|
|
205
203
|
attr_reader nodes: Array[DocumentNode]
|
|
206
|
-
|
|
204
|
+
attr_reader source_format: String?
|
|
207
205
|
|
|
208
|
-
def initialize: (nodes: Array[DocumentNode], ?source_format: String) -> void
|
|
209
|
-
|
|
206
|
+
def initialize: (nodes: Array[DocumentNode], ?source_format: String) -> void
|
|
207
|
+
end
|
|
210
208
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
209
|
+
class DocumentNode
|
|
210
|
+
attr_reader id: String
|
|
211
|
+
attr_reader content: NodeContent
|
|
212
|
+
attr_reader parent: Integer?
|
|
215
213
|
attr_reader children: Array[Integer]
|
|
216
214
|
attr_reader annotations: Array[TextAnnotation]
|
|
217
|
-
attr_reader attributes: Hash[String, String]
|
|
215
|
+
attr_reader attributes: Hash[String, String]?
|
|
218
216
|
|
|
219
|
-
def initialize: (id: String, content: NodeContent, ?parent: Integer, children: Array[Integer], annotations: Array[TextAnnotation], ?attributes: Hash[String, String]) -> void
|
|
220
|
-
|
|
217
|
+
def initialize: (id: String, content: NodeContent, ?parent: Integer, children: Array[Integer], annotations: Array[TextAnnotation], ?attributes: Hash[String, String]) -> void
|
|
218
|
+
end
|
|
221
219
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
220
|
+
class TextAnnotation
|
|
221
|
+
attr_reader start: Integer
|
|
222
|
+
attr_reader end: Integer
|
|
223
|
+
attr_reader kind: AnnotationKind
|
|
226
224
|
|
|
227
225
|
def initialize: (start: Integer, end: Integer, kind: AnnotationKind) -> void
|
|
228
|
-
|
|
226
|
+
end
|
|
229
227
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
class MetadataEntry
|
|
229
|
+
attr_reader key: String
|
|
230
|
+
attr_reader value: String
|
|
233
231
|
|
|
234
232
|
def initialize: (key: String, value: String) -> void
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
def initialize: (?content: String, ?document: DocumentStructure, ?metadata: HtmlMetadata, ?tables: Array[TableData], ?warnings: Array[ProcessingWarning]) -> void
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> void
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
class ConversionResult
|
|
236
|
+
attr_reader content: String?
|
|
237
|
+
attr_reader document: DocumentStructure?
|
|
238
|
+
attr_reader metadata: HtmlMetadata
|
|
239
|
+
attr_reader tables: Array[TableData]
|
|
240
|
+
attr_reader warnings: Array[ProcessingWarning]
|
|
241
|
+
|
|
242
|
+
def initialize: (?content: String, ?document: DocumentStructure, ?metadata: HtmlMetadata, ?tables: Array[TableData], ?warnings: Array[ProcessingWarning]) -> void
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
class TableGrid
|
|
246
|
+
attr_reader rows: Integer
|
|
247
|
+
attr_reader cols: Integer
|
|
248
|
+
attr_reader cells: Array[GridCell]
|
|
249
|
+
|
|
250
|
+
def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> void
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
class GridCell
|
|
254
|
+
attr_reader content: String
|
|
255
|
+
attr_reader row: Integer
|
|
256
|
+
attr_reader col: Integer
|
|
257
|
+
attr_reader row_span: Integer
|
|
258
|
+
attr_reader col_span: Integer
|
|
259
|
+
attr_reader is_header: bool
|
|
262
260
|
|
|
263
261
|
def initialize: (content: String, row: Integer, col: Integer, row_span: Integer, col_span: Integer, is_header: bool) -> void
|
|
264
|
-
|
|
262
|
+
end
|
|
265
263
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
264
|
+
class TableData
|
|
265
|
+
attr_reader grid: TableGrid
|
|
266
|
+
attr_reader markdown: String
|
|
269
267
|
|
|
270
268
|
def initialize: (grid: TableGrid, markdown: String) -> void
|
|
271
|
-
|
|
269
|
+
end
|
|
272
270
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
271
|
+
class ProcessingWarning
|
|
272
|
+
attr_reader message: String
|
|
273
|
+
attr_reader kind: WarningKind
|
|
276
274
|
|
|
277
275
|
def initialize: (message: String, kind: WarningKind) -> void
|
|
278
|
-
|
|
276
|
+
end
|
|
279
277
|
|
|
280
|
-
|
|
281
|
-
|
|
278
|
+
class VisitorHandle
|
|
279
|
+
end
|
|
282
280
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
281
|
+
class NodeContext
|
|
282
|
+
attr_reader node_type: NodeType
|
|
283
|
+
attr_reader tag_name: String
|
|
284
|
+
attr_reader depth: Integer
|
|
285
|
+
attr_reader index_in_parent: Integer
|
|
286
|
+
attr_reader parent_tag: String?
|
|
287
|
+
attr_reader is_inline: bool
|
|
290
288
|
|
|
291
289
|
def initialize: (node_type: NodeType, tag_name: String, depth: Integer, index_in_parent: Integer, ?parent_tag: String, is_inline: bool) -> void
|
|
292
|
-
def attributes: () -> Hash[String, String]
|
|
290
|
+
def attributes: () -> Hash[String, String]
|
|
293
291
|
def into_owned: () -> NodeContext
|
|
294
|
-
|
|
295
|
-
end
|
|
292
|
+
end
|
|
296
293
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
294
|
+
class TextDirection
|
|
295
|
+
type value = :left_to_right | :right_to_left | :auto
|
|
296
|
+
end
|
|
300
297
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
298
|
+
class LinkType
|
|
299
|
+
type value = :anchor | :internal | :external | :email | :phone | :other
|
|
300
|
+
end
|
|
304
301
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
302
|
+
class ImageType
|
|
303
|
+
type value = :data_uri | :inline_svg | :external | :relative
|
|
304
|
+
end
|
|
308
305
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
306
|
+
class StructuredDataType
|
|
307
|
+
type value = :json_ld | :microdata | :rd_fa
|
|
308
|
+
end
|
|
312
309
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
310
|
+
class TierStrategy
|
|
311
|
+
type value = :auto | :tier2 | :tier1
|
|
312
|
+
end
|
|
316
313
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
314
|
+
class PreprocessingPreset
|
|
315
|
+
type value = :minimal | :standard | :aggressive
|
|
316
|
+
end
|
|
320
317
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
318
|
+
class HeadingStyle
|
|
319
|
+
type value = :underlined | :atx | :atx_closed
|
|
320
|
+
end
|
|
324
321
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
322
|
+
class ListIndentType
|
|
323
|
+
type value = :spaces | :tabs
|
|
324
|
+
end
|
|
328
325
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
326
|
+
class WhitespaceMode
|
|
327
|
+
type value = :normalized | :strict
|
|
328
|
+
end
|
|
332
329
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
330
|
+
class NewlineStyle
|
|
331
|
+
type value = :spaces | :backslash
|
|
332
|
+
end
|
|
336
333
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
334
|
+
class CodeBlockStyle
|
|
335
|
+
type value = :indented | :backticks | :tildes
|
|
336
|
+
end
|
|
340
337
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
338
|
+
class HighlightStyle
|
|
339
|
+
type value = :double_equal | :html | :bold | :none
|
|
340
|
+
end
|
|
344
341
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
342
|
+
class LinkStyle
|
|
343
|
+
type value = :inline | :reference
|
|
344
|
+
end
|
|
348
345
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
346
|
+
class UrlEscapeStyle
|
|
347
|
+
type value = :angle | :percent
|
|
348
|
+
end
|
|
352
349
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
350
|
+
class OutputFormat
|
|
351
|
+
type value = :markdown | :djot | :plain
|
|
352
|
+
end
|
|
356
353
|
|
|
357
|
-
|
|
358
|
-
|
|
354
|
+
class NodeContent
|
|
355
|
+
end
|
|
359
356
|
|
|
360
|
-
|
|
361
|
-
|
|
357
|
+
class AnnotationKind
|
|
358
|
+
end
|
|
362
359
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
360
|
+
class WarningKind
|
|
361
|
+
type value = :image_extraction_failed | :encoding_fallback | :truncated_input | :malformed_html | :sanitization_applied | :depth_limit_exceeded
|
|
362
|
+
end
|
|
366
363
|
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
364
|
+
class NodeType
|
|
365
|
+
type value = :text | :element | :heading | :paragraph | :div | :blockquote | :pre | :hr | :list | :list_item | :definition_list | :definition_term | :definition_description | :table | :table_row | :table_cell | :table_header | :table_body | :table_head | :table_foot | :link | :image | :strong | :em | :code | :strikethrough | :underline | :subscript | :superscript | :mark | :small | :br | :span | :article | :section | :nav | :aside | :header | :footer | :main | :figure | :figcaption | :time | :details | :summary | :form | :input | :select | :option | :button | :textarea | :label | :fieldset | :legend | :audio | :video | :picture | :source | :iframe | :svg | :canvas | :ruby | :rt | :rp | :abbr | :kbd | :samp | :var | :cite | :q | :del | :ins | :data | :meter | :progress | :output | :template | :slot | :html | :head | :body | :title | :meta | :link_tag | :style | :script | :base | :custom
|
|
366
|
+
end
|
|
370
367
|
|
|
371
|
-
|
|
372
|
-
|
|
368
|
+
class VisitResult
|
|
369
|
+
end
|
|
373
370
|
|
|
374
|
-
def self.convert: (String html, ?ConversionOptions options) -> ConversionResult
|
|
371
|
+
def self.convert: (String html, ?ConversionOptions options) -> ConversionResult
|
|
375
372
|
|
|
376
373
|
end
|