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