html-to-markdown 3.11.4 → 3.12.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/sig/types.rbs CHANGED
@@ -1,373 +1,372 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:f3a3421ae776c3ce9950a5a7b9e56d5732b7a5d34f283c57b21dac9e54e47606
3
2
  # To regenerate: alef generate
4
3
  # To verify freshness: alef verify
5
4
 
6
5
  module HtmlToMarkdown
7
6
 
8
- VERSION: String
7
+ VERSION: String
8
+
9
+ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
10
+
11
+ class ConversionOptions
12
+ attr_reader heading_style: HeadingStyle
13
+ attr_reader list_indent_type: ListIndentType
14
+ attr_reader list_indent_width: Integer
15
+ attr_reader bullets: String
16
+ attr_reader strong_em_symbol: String
17
+ attr_reader escape_asterisks: bool
18
+ attr_reader escape_underscores: bool
19
+ attr_reader escape_misc: bool
20
+ attr_reader escape_ascii: bool
21
+ attr_reader code_language: String
22
+ attr_reader autolinks: bool
23
+ attr_reader default_title: bool
24
+ attr_reader br_in_tables: bool
25
+ attr_reader compact_tables: bool
26
+ attr_reader highlight_style: HighlightStyle
27
+ attr_reader extract_metadata: bool
28
+ attr_reader whitespace_mode: WhitespaceMode
29
+ attr_reader strip_newlines: bool
30
+ attr_reader wrap: bool
31
+ attr_reader wrap_width: Integer
32
+ attr_reader convert_as_inline: bool
33
+ attr_reader sub_symbol: String
34
+ attr_reader sup_symbol: String
35
+ attr_reader newline_style: NewlineStyle
36
+ attr_reader code_block_style: CodeBlockStyle
37
+ attr_reader keep_inline_images_in: Array[String]
38
+ attr_reader preprocessing: PreprocessingOptions
39
+ attr_reader encoding: String
40
+ attr_reader debug: bool
41
+ attr_reader strip_tags: Array[String]
42
+ attr_reader preserve_tags: Array[String]
43
+ attr_reader skip_images: bool
44
+ attr_reader url_escape_style: UrlEscapeStyle
45
+ attr_reader link_style: LinkStyle
46
+ attr_reader output_format: OutputFormat
47
+ attr_reader include_document_structure: bool
48
+ attr_reader extract_images: bool
49
+ attr_reader max_image_size: Integer
50
+ attr_reader capture_svg: bool
51
+ attr_reader infer_dimensions: bool
52
+ attr_reader max_depth: Integer?
53
+ attr_reader exclude_selectors: Array[String]
54
+ attr_reader tier_strategy: TierStrategy
55
+ attr_reader visitor: VisitorHandle?
56
+
57
+ 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
58
+ end
59
+
60
+ class ConversionOptionsUpdate
61
+ attr_reader heading_style: HeadingStyle?
62
+ attr_reader list_indent_type: ListIndentType?
63
+ attr_reader list_indent_width: Integer?
64
+ attr_reader bullets: String?
65
+ attr_reader strong_em_symbol: String?
66
+ attr_reader escape_asterisks: bool?
67
+ attr_reader escape_underscores: bool?
68
+ attr_reader escape_misc: bool?
69
+ attr_reader escape_ascii: bool?
70
+ attr_reader code_language: String?
71
+ attr_reader autolinks: bool?
72
+ attr_reader default_title: bool?
73
+ attr_reader br_in_tables: bool?
74
+ attr_reader compact_tables: bool?
75
+ attr_reader highlight_style: HighlightStyle?
76
+ attr_reader extract_metadata: bool?
77
+ attr_reader whitespace_mode: WhitespaceMode?
78
+ attr_reader strip_newlines: bool?
79
+ attr_reader wrap: bool?
80
+ attr_reader wrap_width: Integer?
81
+ attr_reader convert_as_inline: bool?
82
+ attr_reader sub_symbol: String?
83
+ attr_reader sup_symbol: String?
84
+ attr_reader newline_style: NewlineStyle?
85
+ attr_reader code_block_style: CodeBlockStyle?
86
+ attr_reader keep_inline_images_in: Array[String]?
87
+ attr_reader preprocessing: PreprocessingOptionsUpdate?
88
+ attr_reader encoding: String?
89
+ attr_reader debug: bool?
90
+ attr_reader strip_tags: Array[String]?
91
+ attr_reader preserve_tags: Array[String]?
92
+ attr_reader skip_images: bool?
93
+ attr_reader url_escape_style: UrlEscapeStyle?
94
+ attr_reader link_style: LinkStyle?
95
+ attr_reader output_format: OutputFormat?
96
+ attr_reader include_document_structure: bool?
97
+ attr_reader extract_images: bool?
98
+ attr_reader max_image_size: Integer?
99
+ attr_reader capture_svg: bool?
100
+ attr_reader infer_dimensions: bool?
101
+ attr_reader max_depth: Integer?
102
+ attr_reader exclude_selectors: Array[String]?
103
+ attr_reader tier_strategy: TierStrategy?
104
+ attr_reader visitor: VisitorHandle?
9
105
 
10
- type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Float | bool | nil
106
+ 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
107
+ end
11
108
 
12
- class DocumentMetadata
13
- attr_reader title: String?
14
- attr_reader description: String?
109
+ class ConversionResult
110
+ attr_reader content: String?
111
+ attr_reader document: DocumentStructure?
112
+ attr_reader metadata: HtmlMetadata
113
+ attr_reader tables: Array[TableData]
114
+ attr_reader warnings: Array[ProcessingWarning]
115
+
116
+ def initialize: (?content: String, ?document: DocumentStructure, ?metadata: HtmlMetadata, ?tables: Array[TableData], ?warnings: Array[ProcessingWarning]) -> void
117
+ end
118
+
119
+ class DocumentMetadata
120
+ attr_reader title: String?
121
+ attr_reader description: String?
15
122
  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?
123
+ attr_reader author: String?
124
+ attr_reader canonical_url: String?
125
+ attr_reader base_href: String?
126
+ attr_reader language: String?
127
+ attr_reader text_direction: TextDirection?
21
128
  attr_reader open_graph: Hash[String, String]
22
129
  attr_reader twitter_card: Hash[String, String]
23
130
  attr_reader meta_tags: Hash[String, String]
24
131
 
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
132
+ 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
133
+ end
27
134
 
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
135
+ class DocumentNode
136
+ attr_reader id: String
137
+ attr_reader content: NodeContent
138
+ attr_reader parent: Integer?
139
+ attr_reader children: Array[Integer]
140
+ attr_reader annotations: Array[TextAnnotation]
141
+ attr_reader attributes: Hash[String, String]?
34
142
 
35
- def initialize: (level: Integer, text: String, ?id: String, depth: Integer, html_offset: Integer) -> void
36
- def is_valid: () -> bool
37
- end
143
+ def initialize: (id: String, content: NodeContent, ?parent: Integer, children: Array[Integer], annotations: Array[TextAnnotation], ?attributes: Hash[String, String]) -> void
144
+ end
38
145
 
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
- attr_reader rel: Array[String]
45
- attr_reader attributes: Hash[String, String]
146
+ class DocumentStructure
147
+ attr_reader nodes: Array[DocumentNode]
148
+ attr_reader source_format: String?
46
149
 
47
- def initialize: (href: String, text: String, ?title: String, link_type: LinkType, rel: Array[String], attributes: Hash[String, String]) -> void
48
- end
150
+ def initialize: (nodes: Array[DocumentNode], ?source_format: String) -> void
151
+ end
49
152
 
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
- attr_reader attributes: Hash[String, String]
153
+ class GridCell
154
+ attr_reader content: String
155
+ attr_reader row: Integer
156
+ attr_reader col: Integer
157
+ attr_reader row_span: Integer
158
+ attr_reader col_span: Integer
159
+ attr_reader is_header: bool
57
160
 
58
- def initialize: (src: String, ?alt: String, ?title: String, ?dimensions: ImageDimensions, image_type: ImageType, attributes: Hash[String, String]) -> void
59
- end
161
+ def initialize: (content: String, row: Integer, col: Integer, row_span: Integer, col_span: Integer, is_header: bool) -> void
162
+ end
60
163
 
61
- class StructuredData
62
- attr_reader data_type: StructuredDataType
63
- attr_reader raw_json: String
64
- attr_reader schema_type: String?
164
+ class HeaderMetadata
165
+ attr_reader level: Integer
166
+ attr_reader text: String
167
+ attr_reader id: String?
168
+ attr_reader depth: Integer
169
+ attr_reader html_offset: Integer
65
170
 
66
- def initialize: (data_type: StructuredDataType, raw_json: String, ?schema_type: String) -> void
67
- end
171
+ def initialize: (level: Integer, text: String, ?id: String, depth: Integer, html_offset: Integer) -> void
172
+ def is_valid: () -> bool
173
+ end
68
174
 
69
- class HtmlMetadata
70
- attr_reader document: DocumentMetadata
175
+ class HtmlMetadata
176
+ attr_reader document: DocumentMetadata
71
177
  attr_reader headers: Array[HeaderMetadata]
72
178
  attr_reader links: Array[LinkMetadata]
73
179
  attr_reader images: Array[ImageMetadata]
74
180
  attr_reader structured_data: Array[StructuredData]
75
181
 
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
182
+ def initialize: (?document: DocumentMetadata, ?headers: Array[HeaderMetadata], ?links: Array[LinkMetadata], ?images: Array[ImageMetadata], ?structured_data: Array[StructuredData]) -> void
183
+ end
182
184
 
183
- def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
184
- end
185
-
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?
191
-
192
- def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
193
- end
194
-
195
- class ImageDimensions
196
- attr_reader width: Integer
197
- attr_reader height: Integer
185
+ class ImageDimensions
186
+ attr_reader width: Integer
187
+ attr_reader height: Integer
198
188
 
199
189
  def initialize: (width: Integer, height: Integer) -> void
200
- end
190
+ end
191
+
192
+ class ImageMetadata
193
+ attr_reader src: String
194
+ attr_reader alt: String?
195
+ attr_reader title: String?
196
+ attr_reader dimensions: ImageDimensions?
197
+ attr_reader image_type: ImageType
198
+ attr_reader attributes: Hash[String, String]
201
199
 
202
- class DocumentStructure
203
- attr_reader nodes: Array[DocumentNode]
204
- attr_reader source_format: String?
200
+ def initialize: (src: String, ?alt: String, ?title: String, ?dimensions: ImageDimensions, image_type: ImageType, attributes: Hash[String, String]) -> void
201
+ end
205
202
 
206
- def initialize: (nodes: Array[DocumentNode], ?source_format: String) -> void
207
- end
203
+ class LinkMetadata
204
+ attr_reader href: String
205
+ attr_reader text: String
206
+ attr_reader title: String?
207
+ attr_reader link_type: LinkType
208
+ attr_reader rel: Array[String]
209
+ attr_reader attributes: Hash[String, String]
208
210
 
209
- class DocumentNode
210
- attr_reader id: String
211
- attr_reader content: NodeContent
212
- attr_reader parent: Integer?
213
- attr_reader children: Array[Integer]
214
- attr_reader annotations: Array[TextAnnotation]
215
- attr_reader attributes: Hash[String, String]?
211
+ def initialize: (href: String, text: String, ?title: String, link_type: LinkType, rel: Array[String], attributes: Hash[String, String]) -> void
212
+ end
216
213
 
217
- def initialize: (id: String, content: NodeContent, ?parent: Integer, children: Array[Integer], annotations: Array[TextAnnotation], ?attributes: Hash[String, String]) -> void
218
- end
214
+ class MetadataEntry
215
+ attr_reader key: String
216
+ attr_reader value: String
219
217
 
220
- class TextAnnotation
221
- attr_reader start: Integer
222
- attr_reader end: Integer
223
- attr_reader kind: AnnotationKind
218
+ def initialize: (key: String, value: String) -> void
219
+ end
224
220
 
225
- def initialize: (start: Integer, end: Integer, kind: AnnotationKind) -> void
226
- end
221
+ class NodeContext
222
+ attr_reader node_type: NodeType
223
+ attr_reader tag_name: String
224
+ attr_reader depth: Integer
225
+ attr_reader index_in_parent: Integer
226
+ attr_reader parent_tag: String?
227
+ attr_reader is_inline: bool
227
228
 
228
- class MetadataEntry
229
- attr_reader key: String
230
- attr_reader value: String
229
+ def initialize: (node_type: NodeType, tag_name: String, depth: Integer, index_in_parent: Integer, ?parent_tag: String, is_inline: bool) -> void
230
+ def attributes: () -> Hash[String, String]
231
+ def into_owned: () -> NodeContext
232
+ end
231
233
 
232
- def initialize: (key: String, value: String) -> void
233
- end
234
+ class PreprocessingOptions
235
+ attr_reader enabled: bool
236
+ attr_reader preset: PreprocessingPreset
237
+ attr_reader remove_navigation: bool
238
+ attr_reader remove_forms: bool
234
239
 
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]
240
+ def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
241
+ end
241
242
 
242
- def initialize: (?content: String, ?document: DocumentStructure, ?metadata: HtmlMetadata, ?tables: Array[TableData], ?warnings: Array[ProcessingWarning]) -> void
243
- end
243
+ class PreprocessingOptionsUpdate
244
+ attr_reader enabled: bool?
245
+ attr_reader preset: PreprocessingPreset?
246
+ attr_reader remove_navigation: bool?
247
+ attr_reader remove_forms: bool?
244
248
 
245
- class TableGrid
246
- attr_reader rows: Integer
247
- attr_reader cols: Integer
248
- attr_reader cells: Array[GridCell]
249
+ def initialize: (?enabled: bool, ?preset: PreprocessingPreset, ?remove_navigation: bool, ?remove_forms: bool) -> void
250
+ end
251
+
252
+ class ProcessingWarning
253
+ attr_reader message: String
254
+ attr_reader kind: WarningKind
249
255
 
250
- def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> void
251
- end
256
+ def initialize: (message: String, kind: WarningKind) -> void
257
+ end
252
258
 
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
259
+ class StructuredData
260
+ attr_reader data_type: StructuredDataType
261
+ attr_reader raw_json: String
262
+ attr_reader schema_type: String?
260
263
 
261
- def initialize: (content: String, row: Integer, col: Integer, row_span: Integer, col_span: Integer, is_header: bool) -> void
262
- end
264
+ def initialize: (data_type: StructuredDataType, raw_json: String, ?schema_type: String) -> void
265
+ end
263
266
 
264
- class TableData
265
- attr_reader grid: TableGrid
266
- attr_reader markdown: String
267
+ class TableData
268
+ attr_reader grid: TableGrid
269
+ attr_reader markdown: String
267
270
 
268
271
  def initialize: (grid: TableGrid, markdown: String) -> void
269
- end
272
+ end
270
273
 
271
- class ProcessingWarning
272
- attr_reader message: String
273
- attr_reader kind: WarningKind
274
+ class TableGrid
275
+ attr_reader rows: Integer
276
+ attr_reader cols: Integer
277
+ attr_reader cells: Array[GridCell]
274
278
 
275
- def initialize: (message: String, kind: WarningKind) -> void
276
- end
279
+ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> void
280
+ end
277
281
 
278
- class VisitorHandle
279
- end
282
+ class TextAnnotation
283
+ attr_reader start: Integer
284
+ attr_reader end: Integer
285
+ attr_reader kind: AnnotationKind
280
286
 
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
287
+ def initialize: (start: Integer, end: Integer, kind: AnnotationKind) -> void
288
+ end
288
289
 
289
- def initialize: (node_type: NodeType, tag_name: String, depth: Integer, index_in_parent: Integer, ?parent_tag: String, is_inline: bool) -> void
290
- def attributes: () -> Hash[String, String]
291
- def into_owned: () -> NodeContext
292
- end
290
+ class VisitorHandle
291
+ end
293
292
 
294
- class TextDirection
295
- type value = :ltr | :rtl | :auto
296
- end
293
+ class AnnotationKind
294
+ end
297
295
 
298
- class LinkType
299
- type value = :anchor | :internal | :external | :email | :phone | :other
300
- end
296
+ class CodeBlockStyle
297
+ type value = :Indented | :Backticks | :Tildes
298
+ end
301
299
 
302
- class ImageType
303
- type value = :data_uri | :inline_svg | :external | :relative
304
- end
300
+ class HeadingStyle
301
+ type value = :Underlined | :Atx | :AtxClosed
302
+ end
305
303
 
306
- class StructuredDataType
307
- type value = :json_ld | :microdata | :rdfa
308
- end
304
+ class HighlightStyle
305
+ type value = :DoubleEqual | :Html | :Bold | :None
306
+ end
309
307
 
310
- class TierStrategy
311
- type value = :auto | :tier2 | :tier1
312
- end
308
+ class ImageType
309
+ type value = :data_uri | :inline_svg | :external | :relative
310
+ end
313
311
 
314
- class PreprocessingPreset
315
- type value = :Minimal | :Standard | :Aggressive
316
- end
312
+ class LinkStyle
313
+ type value = :Inline | :Reference
314
+ end
317
315
 
318
- class HeadingStyle
319
- type value = :Underlined | :Atx | :AtxClosed
320
- end
316
+ class LinkType
317
+ type value = :anchor | :internal | :external | :email | :phone | :other
318
+ end
321
319
 
322
- class ListIndentType
323
- type value = :Spaces | :Tabs
324
- end
320
+ class ListIndentType
321
+ type value = :Spaces | :Tabs
322
+ end
325
323
 
326
- class WhitespaceMode
327
- type value = :Normalized | :Strict
328
- end
324
+ class NewlineStyle
325
+ type value = :Spaces | :Backslash
326
+ end
329
327
 
330
- class NewlineStyle
331
- type value = :Spaces | :Backslash
332
- end
328
+ class NodeContent
329
+ end
333
330
 
334
- class CodeBlockStyle
335
- type value = :Indented | :Backticks | :Tildes
336
- end
331
+ class NodeType
332
+ type value = :Text | :Element | :Heading | :Paragraph | :Div | :Blockquote | :Pre | :Hr | :List | :ListItem | :DefinitionList | :DefinitionTerm | :DefinitionDescription | :Table | :TableRow | :TableCell | :TableHeader | :TableBody | :TableHead | :TableFoot | :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 | :LinkTag | :Style | :Script | :Base | :Custom
333
+ end
337
334
 
338
- class HighlightStyle
339
- type value = :DoubleEqual | :Html | :Bold | :None
340
- end
335
+ class OutputFormat
336
+ type value = :Markdown | :Djot | :Plain
337
+ end
341
338
 
342
- class LinkStyle
343
- type value = :Inline | :Reference
344
- end
339
+ class PreprocessingPreset
340
+ type value = :Minimal | :Standard | :Aggressive
341
+ end
345
342
 
346
- class UrlEscapeStyle
347
- type value = :Angle | :Percent
348
- end
343
+ class StructuredDataType
344
+ type value = :json_ld | :microdata | :rdfa
345
+ end
349
346
 
350
- class OutputFormat
351
- type value = :Markdown | :Djot | :Plain
352
- end
347
+ class TextDirection
348
+ type value = :ltr | :rtl | :auto
349
+ end
353
350
 
354
- class NodeContent
355
- end
351
+ class TierStrategy
352
+ type value = :auto | :tier2 | :tier1
353
+ end
356
354
 
357
- class AnnotationKind
358
- end
355
+ class UrlEscapeStyle
356
+ type value = :Angle | :Percent
357
+ end
359
358
 
360
- class WarningKind
361
- type value = :image_extraction_failed | :encoding_fallback | :truncated_input | :malformed_html | :sanitization_applied | :depth_limit_exceeded
362
- end
359
+ class VisitResult
360
+ end
363
361
 
364
- class NodeType
365
- type value = :Text | :Element | :Heading | :Paragraph | :Div | :Blockquote | :Pre | :Hr | :List | :ListItem | :DefinitionList | :DefinitionTerm | :DefinitionDescription | :Table | :TableRow | :TableCell | :TableHeader | :TableBody | :TableHead | :TableFoot | :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 | :LinkTag | :Style | :Script | :Base | :Custom
366
- end
362
+ class WarningKind
363
+ type value = :image_extraction_failed | :encoding_fallback | :truncated_input | :malformed_html | :sanitization_applied | :depth_limit_exceeded
364
+ end
367
365
 
368
- class VisitResult
369
- end
366
+ class WhitespaceMode
367
+ type value = :Normalized | :Strict
368
+ end
370
369
 
371
- def self.convert: (String html, ?ConversionOptions options) -> ConversionResult
370
+ def self.convert: (String html, ?ConversionOptions options) -> ConversionResult
372
371
 
373
372
  end