html-to-markdown 3.18.6 → 3.19.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.
- checksums.yaml +4 -4
- data/ext/html_to_markdown_rb/native/Cargo.lock +31 -31
- data/ext/html_to_markdown_rb/native/Cargo.toml +3 -3
- data/ext/html_to_markdown_rb/src/lib.rs +107 -4
- data/lib/html_to_markdown/native.rb +4 -1
- data/lib/html_to_markdown/version.rb +2 -2
- data/sig/types.rbs +510 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e42d1e5a9c4cab13d5840556d5e6a518aa98576495b6fe08cf376a93392d8ba5
|
|
4
|
+
data.tar.gz: 7e20b6da6705d9bcf643ee55dccd5b0de4131b170236c2bf9785eed5dd048133
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9510c005552e50c8397a8db398cc8f63e5d57dbd5ca889c96077019d2db9f60f63fd1a14a234d3836752aedae0620919a07d6c90b8bf5fce5dbded58c0d49f1a
|
|
7
|
+
data.tar.gz: a79521d8aa524eb9261167d71fd56a1fffa31ec7a1f2a4458ba3076d968d1361f18b96ca5f907d596120f0ad84e743ecd2e1d62f78f0582af1dd3b523845fb6c
|
|
@@ -152,9 +152,9 @@ dependencies = [
|
|
|
152
152
|
|
|
153
153
|
[[package]]
|
|
154
154
|
name = "crc32fast"
|
|
155
|
-
version = "1.5.
|
|
155
|
+
version = "1.5.3"
|
|
156
156
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
157
|
-
checksum = "
|
|
157
|
+
checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055"
|
|
158
158
|
dependencies = [
|
|
159
159
|
"cfg-if",
|
|
160
160
|
]
|
|
@@ -252,7 +252,7 @@ checksum = "491194d601b4fa9fac3c9571e014070a0ad1bc3392d1bc10419695196a8b3cc3"
|
|
|
252
252
|
|
|
253
253
|
[[package]]
|
|
254
254
|
name = "html-to-markdown-rb"
|
|
255
|
-
version = "3.
|
|
255
|
+
version = "3.19.0"
|
|
256
256
|
dependencies = [
|
|
257
257
|
"async-trait",
|
|
258
258
|
"html-to-markdown-rs",
|
|
@@ -266,9 +266,9 @@ dependencies = [
|
|
|
266
266
|
|
|
267
267
|
[[package]]
|
|
268
268
|
name = "html-to-markdown-rs"
|
|
269
|
-
version = "3.
|
|
269
|
+
version = "3.19.0"
|
|
270
270
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
271
|
-
checksum = "
|
|
271
|
+
checksum = "ddada45be32a036999fbda2be5df286dc2001816e60099ec3fd445fc6c3bb69b"
|
|
272
272
|
dependencies = [
|
|
273
273
|
"ahash",
|
|
274
274
|
"astral-tl",
|
|
@@ -301,9 +301,9 @@ dependencies = [
|
|
|
301
301
|
|
|
302
302
|
[[package]]
|
|
303
303
|
name = "icu_collections"
|
|
304
|
-
version = "2.
|
|
304
|
+
version = "2.4.0"
|
|
305
305
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
306
|
-
checksum = "
|
|
306
|
+
checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd"
|
|
307
307
|
dependencies = [
|
|
308
308
|
"displaydoc",
|
|
309
309
|
"potential_utf",
|
|
@@ -315,9 +315,9 @@ dependencies = [
|
|
|
315
315
|
|
|
316
316
|
[[package]]
|
|
317
317
|
name = "icu_locale_core"
|
|
318
|
-
version = "2.
|
|
318
|
+
version = "2.4.0"
|
|
319
319
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
320
|
-
checksum = "
|
|
320
|
+
checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0"
|
|
321
321
|
dependencies = [
|
|
322
322
|
"displaydoc",
|
|
323
323
|
"litemap",
|
|
@@ -328,9 +328,9 @@ dependencies = [
|
|
|
328
328
|
|
|
329
329
|
[[package]]
|
|
330
330
|
name = "icu_normalizer"
|
|
331
|
-
version = "2.
|
|
331
|
+
version = "2.4.0"
|
|
332
332
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
333
|
-
checksum = "
|
|
333
|
+
checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599"
|
|
334
334
|
dependencies = [
|
|
335
335
|
"icu_collections",
|
|
336
336
|
"icu_normalizer_data",
|
|
@@ -342,15 +342,15 @@ dependencies = [
|
|
|
342
342
|
|
|
343
343
|
[[package]]
|
|
344
344
|
name = "icu_normalizer_data"
|
|
345
|
-
version = "2.
|
|
345
|
+
version = "2.4.0"
|
|
346
346
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
347
|
-
checksum = "
|
|
347
|
+
checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc"
|
|
348
348
|
|
|
349
349
|
[[package]]
|
|
350
350
|
name = "icu_properties"
|
|
351
|
-
version = "2.
|
|
351
|
+
version = "2.4.0"
|
|
352
352
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
353
|
-
checksum = "
|
|
353
|
+
checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f"
|
|
354
354
|
dependencies = [
|
|
355
355
|
"displaydoc",
|
|
356
356
|
"icu_collections",
|
|
@@ -363,15 +363,15 @@ dependencies = [
|
|
|
363
363
|
|
|
364
364
|
[[package]]
|
|
365
365
|
name = "icu_properties_data"
|
|
366
|
-
version = "2.
|
|
366
|
+
version = "2.4.0"
|
|
367
367
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
368
|
-
checksum = "
|
|
368
|
+
checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf"
|
|
369
369
|
|
|
370
370
|
[[package]]
|
|
371
371
|
name = "icu_provider"
|
|
372
|
-
version = "2.
|
|
372
|
+
version = "2.4.0"
|
|
373
373
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
374
|
-
checksum = "
|
|
374
|
+
checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514"
|
|
375
375
|
dependencies = [
|
|
376
376
|
"displaydoc",
|
|
377
377
|
"icu_locale_core",
|
|
@@ -897,9 +897,9 @@ checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"
|
|
|
897
897
|
|
|
898
898
|
[[package]]
|
|
899
899
|
name = "smallvec"
|
|
900
|
-
version = "1.16.
|
|
900
|
+
version = "1.16.4"
|
|
901
901
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
902
|
-
checksum = "
|
|
902
|
+
checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8"
|
|
903
903
|
|
|
904
904
|
[[package]]
|
|
905
905
|
name = "stable_deref_trait"
|
|
@@ -1004,9 +1004,9 @@ dependencies = [
|
|
|
1004
1004
|
|
|
1005
1005
|
[[package]]
|
|
1006
1006
|
name = "tinystr"
|
|
1007
|
-
version = "0.8.
|
|
1007
|
+
version = "0.8.5"
|
|
1008
1008
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1009
|
-
checksum = "
|
|
1009
|
+
checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a"
|
|
1010
1010
|
dependencies = [
|
|
1011
1011
|
"displaydoc",
|
|
1012
1012
|
"zerovec",
|
|
@@ -1014,9 +1014,9 @@ dependencies = [
|
|
|
1014
1014
|
|
|
1015
1015
|
[[package]]
|
|
1016
1016
|
name = "tokio"
|
|
1017
|
-
version = "1.
|
|
1017
|
+
version = "1.54.1"
|
|
1018
1018
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1019
|
-
checksum = "
|
|
1019
|
+
checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
|
|
1020
1020
|
dependencies = [
|
|
1021
1021
|
"pin-project-lite",
|
|
1022
1022
|
]
|
|
@@ -1120,9 +1120,9 @@ checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"
|
|
|
1120
1120
|
|
|
1121
1121
|
[[package]]
|
|
1122
1122
|
name = "yoke"
|
|
1123
|
-
version = "0.8.
|
|
1123
|
+
version = "0.8.4"
|
|
1124
1124
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1125
|
-
checksum = "
|
|
1125
|
+
checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3"
|
|
1126
1126
|
dependencies = [
|
|
1127
1127
|
"stable_deref_trait",
|
|
1128
1128
|
"yoke-derive",
|
|
@@ -1195,9 +1195,9 @@ dependencies = [
|
|
|
1195
1195
|
|
|
1196
1196
|
[[package]]
|
|
1197
1197
|
name = "zerovec"
|
|
1198
|
-
version = "0.11.
|
|
1198
|
+
version = "0.11.9"
|
|
1199
1199
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1200
|
-
checksum = "
|
|
1200
|
+
checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40"
|
|
1201
1201
|
dependencies = [
|
|
1202
1202
|
"yoke",
|
|
1203
1203
|
"zerofrom",
|
|
@@ -1206,9 +1206,9 @@ dependencies = [
|
|
|
1206
1206
|
|
|
1207
1207
|
[[package]]
|
|
1208
1208
|
name = "zerovec-derive"
|
|
1209
|
-
version = "0.11.
|
|
1209
|
+
version = "0.11.7"
|
|
1210
1210
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1211
|
-
checksum = "
|
|
1211
|
+
checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a"
|
|
1212
1212
|
dependencies = [
|
|
1213
1213
|
"proc-macro2",
|
|
1214
1214
|
"quote",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:fa3a53f518517843e506e230f22cd23c0afd1bcead1c05e1f1d17a72039f3f7d
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
6
6
|
[package]
|
|
7
7
|
name = "html-to-markdown-rb"
|
|
8
|
-
version = "3.
|
|
8
|
+
version = "3.19.0"
|
|
9
9
|
edition = "2024"
|
|
10
10
|
authors = ["Na'aman Hirschfeld <naaman@xberg.io>", "Tobias Perlstein <tobias@xberg.io>"]
|
|
11
11
|
license = "MIT"
|
|
@@ -31,7 +31,7 @@ visitor = ["html-to-markdown-rs/visitor"]
|
|
|
31
31
|
|
|
32
32
|
[dependencies]
|
|
33
33
|
async-trait = "0.1"
|
|
34
|
-
html-to-markdown-rs = { version = "3.
|
|
34
|
+
html-to-markdown-rs = { version = "3.19.0", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
|
|
35
35
|
magnus = "0.9"
|
|
36
36
|
rb-sys = ">=0.9.130, <0.10"
|
|
37
37
|
serde = { version = "1", features = ["derive"] }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:4b8dded025d0cab583492c692b2a248f959abe1e38e464768e056b4624f1bb5e
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -5346,6 +5346,56 @@ pub fn convert(args: &[magnus::Value]) -> Result<ConversionResult, Error> {
|
|
|
5346
5346
|
})
|
|
5347
5347
|
}
|
|
5348
5348
|
|
|
5349
|
+
#[allow(clippy::missing_errors_doc)]
|
|
5350
|
+
#[allow(unused_variables)]
|
|
5351
|
+
pub fn convert_with_accessible_names(args: &[magnus::Value]) -> Result<ConversionResult, Error> {
|
|
5352
|
+
let args = magnus::scan_args::scan_args::<(String, bool), (Option<magnus::Value>,), (), (), (), ()>(args)?;
|
|
5353
|
+
let (html, use_accessible_names) = args.required;
|
|
5354
|
+
let (visitor,) = args.optional;
|
|
5355
|
+
let options_core = match visitor {
|
|
5356
|
+
Some(v) if !v.is_nil() => {
|
|
5357
|
+
if magnus::RHash::from_value(v).is_some() {
|
|
5358
|
+
let json = v.funcall::<_, _, String>("to_json", ()).map_err(|e| {
|
|
5359
|
+
magnus::Error::new(
|
|
5360
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(),
|
|
5361
|
+
format!("failed to serialize Ruby options to JSON: {}", e),
|
|
5362
|
+
)
|
|
5363
|
+
})?;
|
|
5364
|
+
serde_json::from_str::<html_to_markdown_rs::ConversionOptions>(&json).map_err(|e| {
|
|
5365
|
+
magnus::Error::new(
|
|
5366
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(),
|
|
5367
|
+
format!("failed to deserialize options JSON: {}", e),
|
|
5368
|
+
)
|
|
5369
|
+
})?
|
|
5370
|
+
} else if let Ok(opts_binding) = <&ConversionOptions as magnus::TryConvert>::try_convert(v) {
|
|
5371
|
+
opts_binding.clone().into()
|
|
5372
|
+
} else {
|
|
5373
|
+
let bridge = RbHtmlVisitorBridge::new(v, String::new())?;
|
|
5374
|
+
let handle = std::sync::Arc::new(std::sync::Mutex::new(bridge)) as html_to_markdown_rs::VisitorHandle;
|
|
5375
|
+
#[allow(
|
|
5376
|
+
clippy::field_reassign_with_default,
|
|
5377
|
+
reason = "External options may be non-exhaustive or contain private fields"
|
|
5378
|
+
)]
|
|
5379
|
+
{
|
|
5380
|
+
let mut opts = html_to_markdown_rs::ConversionOptions::default();
|
|
5381
|
+
opts.visitor = Some(handle);
|
|
5382
|
+
opts
|
|
5383
|
+
}
|
|
5384
|
+
}
|
|
5385
|
+
}
|
|
5386
|
+
_ => html_to_markdown_rs::ConversionOptions::default(),
|
|
5387
|
+
};
|
|
5388
|
+
|
|
5389
|
+
html_to_markdown_rs::convert_with_accessible_names(&html, use_accessible_names, Some(options_core))
|
|
5390
|
+
.map(|val| val.into())
|
|
5391
|
+
.map_err(|e| {
|
|
5392
|
+
magnus::Error::new(
|
|
5393
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(),
|
|
5394
|
+
e.to_string(),
|
|
5395
|
+
)
|
|
5396
|
+
})
|
|
5397
|
+
}
|
|
5398
|
+
|
|
5349
5399
|
fn nodecontext_to_rb_hash(ctx: &html_to_markdown_rs::NodeContext) -> magnus::RHash {
|
|
5350
5400
|
let ruby = unsafe { magnus::Ruby::get_unchecked() };
|
|
5351
5401
|
let h = ruby.hash_new();
|
|
@@ -8420,11 +8470,49 @@ impl From<html_to_markdown_rs::options::WhitespaceMode> for WhitespaceMode {
|
|
|
8420
8470
|
}
|
|
8421
8471
|
}
|
|
8422
8472
|
|
|
8423
|
-
/// Convert
|
|
8473
|
+
/// Convert the error a core call returned into the typed Ruby exception of its family. An error
|
|
8474
|
+
/// of a type with no converter becomes a `RuntimeError` with the message.
|
|
8475
|
+
#[allow(dead_code)]
|
|
8476
|
+
fn alef_magnus_err<E: std::fmt::Display + 'static>(e: E) -> magnus::Error {
|
|
8477
|
+
let message = e.to_string();
|
|
8478
|
+
#[allow(unused_variables)]
|
|
8479
|
+
let any: Box<dyn std::any::Any> = Box::new(e);
|
|
8480
|
+
let any = match any.downcast::<html_to_markdown_rs::error::ConversionError>() {
|
|
8481
|
+
Ok(typed) => return conversion_error_to_magnus_err(*typed),
|
|
8482
|
+
Err(any) => any,
|
|
8483
|
+
};
|
|
8484
|
+
let _ = any;
|
|
8485
|
+
magnus::Error::new(
|
|
8486
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_runtime_error(),
|
|
8487
|
+
message,
|
|
8488
|
+
)
|
|
8489
|
+
}
|
|
8490
|
+
|
|
8491
|
+
/// Convert a `html_to_markdown_rs::error::ConversionError` error to a typed Ruby exception.
|
|
8424
8492
|
#[allow(dead_code)]
|
|
8425
8493
|
fn conversion_error_to_magnus_err(e: html_to_markdown_rs::error::ConversionError) -> magnus::Error {
|
|
8426
|
-
|
|
8427
|
-
|
|
8494
|
+
use magnus::prelude::*;
|
|
8495
|
+
let message = e.to_string();
|
|
8496
|
+
let ruby = unsafe { magnus::Ruby::get_unchecked() };
|
|
8497
|
+
#[allow(unreachable_patterns)]
|
|
8498
|
+
let class_name = match &e {
|
|
8499
|
+
html_to_markdown_rs::error::ConversionError::ParseError(..) => "ParseError",
|
|
8500
|
+
html_to_markdown_rs::error::ConversionError::SanitizationError(..) => "SanitizationError",
|
|
8501
|
+
html_to_markdown_rs::error::ConversionError::ConfigError(..) => "ConfigError",
|
|
8502
|
+
html_to_markdown_rs::error::ConversionError::IoError(..) => "IoError",
|
|
8503
|
+
html_to_markdown_rs::error::ConversionError::Panic(..) => "PanicError",
|
|
8504
|
+
html_to_markdown_rs::error::ConversionError::InvalidInput(..) => "InvalidInputError",
|
|
8505
|
+
html_to_markdown_rs::error::ConversionError::InputTooLarge { .. } => "InputTooLargeError",
|
|
8506
|
+
html_to_markdown_rs::error::ConversionError::Other(..) => "OtherError",
|
|
8507
|
+
_ => "ConversionError",
|
|
8508
|
+
};
|
|
8509
|
+
let build = || -> Result<magnus::Error, magnus::Error> {
|
|
8510
|
+
let module = ruby.define_module("HtmlToMarkdownRs")?;
|
|
8511
|
+
let class: magnus::ExceptionClass = module.const_get(class_name)?;
|
|
8512
|
+
let exception = class.new_instance((message.as_str(),))?;
|
|
8513
|
+
Ok(magnus::Error::from(exception))
|
|
8514
|
+
};
|
|
8515
|
+
build().unwrap_or_else(|_| magnus::Error::new(ruby.exception_runtime_error(), message))
|
|
8428
8516
|
}
|
|
8429
8517
|
|
|
8430
8518
|
#[magnus::init]
|
|
@@ -9010,5 +9098,20 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
9010
9098
|
|
|
9011
9099
|
module.define_module_function("convert", function!(convert, -1))?;
|
|
9012
9100
|
|
|
9101
|
+
module.define_module_function(
|
|
9102
|
+
"convert_with_accessible_names",
|
|
9103
|
+
function!(convert_with_accessible_names, -1),
|
|
9104
|
+
)?;
|
|
9105
|
+
|
|
9106
|
+
let conversion_error_class = module.define_error("ConversionError", ruby.exception_standard_error())?;
|
|
9107
|
+
let parse_error_class = module.define_error("ParseError", conversion_error_class)?;
|
|
9108
|
+
let sanitization_error_class = module.define_error("SanitizationError", conversion_error_class)?;
|
|
9109
|
+
let config_error_class = module.define_error("ConfigError", conversion_error_class)?;
|
|
9110
|
+
let io_error_class = module.define_error("IoError", conversion_error_class)?;
|
|
9111
|
+
let panic_error_class = module.define_error("PanicError", conversion_error_class)?;
|
|
9112
|
+
let invalid_input_error_class = module.define_error("InvalidInputError", conversion_error_class)?;
|
|
9113
|
+
let input_too_large_error_class = module.define_error("InputTooLargeError", conversion_error_class)?;
|
|
9114
|
+
let other_error_class = module.define_error("OtherError", conversion_error_class)?;
|
|
9115
|
+
|
|
9013
9116
|
Ok(())
|
|
9014
9117
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:09a04cb502ed10072dd986b919b61b19dd89f1684de6b0ec0ad98dbc4a7f9805
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
@@ -60,6 +60,9 @@ module HtmlToMarkdown
|
|
|
60
60
|
define_singleton_method(:convert) { |*args, **kwargs, &blk|
|
|
61
61
|
HtmlToMarkdownRs.public_send(:convert, *args, **kwargs, &blk)
|
|
62
62
|
}
|
|
63
|
+
define_singleton_method(:convert_with_accessible_names) { |*args, **kwargs, &blk|
|
|
64
|
+
HtmlToMarkdownRs.public_send(:convert_with_accessible_names, *args, **kwargs, &blk)
|
|
65
|
+
}
|
|
63
66
|
end
|
|
64
67
|
|
|
65
68
|
module HtmlToMarkdown
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:2af93614191f5e65ab3e6f136720482baa1b1ccd900ee7561aeb92a517ef3fe1
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module HtmlToMarkdown
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "3.
|
|
9
|
+
VERSION = "3.19.0"
|
|
10
10
|
end
|
data/sig/types.rbs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:0715469498b948fa0fede0134e676b43663986d359510ac029708f761e5dd5eb
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -303,7 +303,155 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
|
|
|
303
303
|
class VisitorHandle
|
|
304
304
|
end
|
|
305
305
|
|
|
306
|
-
|
|
306
|
+
module AnnotationKind
|
|
307
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
class AnnotationKindBold
|
|
311
|
+
include AnnotationKind
|
|
312
|
+
def bold?: () -> bool
|
|
313
|
+
def italic?: () -> bool
|
|
314
|
+
def underline?: () -> bool
|
|
315
|
+
def strikethrough?: () -> bool
|
|
316
|
+
def code?: () -> bool
|
|
317
|
+
def subscript?: () -> bool
|
|
318
|
+
def superscript?: () -> bool
|
|
319
|
+
def highlight?: () -> bool
|
|
320
|
+
def link?: () -> bool
|
|
321
|
+
|
|
322
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
323
|
+
def self.new: -> AnnotationKindBold
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
class AnnotationKindItalic
|
|
327
|
+
include AnnotationKind
|
|
328
|
+
def bold?: () -> bool
|
|
329
|
+
def italic?: () -> bool
|
|
330
|
+
def underline?: () -> bool
|
|
331
|
+
def strikethrough?: () -> bool
|
|
332
|
+
def code?: () -> bool
|
|
333
|
+
def subscript?: () -> bool
|
|
334
|
+
def superscript?: () -> bool
|
|
335
|
+
def highlight?: () -> bool
|
|
336
|
+
def link?: () -> bool
|
|
337
|
+
|
|
338
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
339
|
+
def self.new: -> AnnotationKindItalic
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
class AnnotationKindUnderline
|
|
343
|
+
include AnnotationKind
|
|
344
|
+
def bold?: () -> bool
|
|
345
|
+
def italic?: () -> bool
|
|
346
|
+
def underline?: () -> bool
|
|
347
|
+
def strikethrough?: () -> bool
|
|
348
|
+
def code?: () -> bool
|
|
349
|
+
def subscript?: () -> bool
|
|
350
|
+
def superscript?: () -> bool
|
|
351
|
+
def highlight?: () -> bool
|
|
352
|
+
def link?: () -> bool
|
|
353
|
+
|
|
354
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
355
|
+
def self.new: -> AnnotationKindUnderline
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
class AnnotationKindStrikethrough
|
|
359
|
+
include AnnotationKind
|
|
360
|
+
def bold?: () -> bool
|
|
361
|
+
def italic?: () -> bool
|
|
362
|
+
def underline?: () -> bool
|
|
363
|
+
def strikethrough?: () -> bool
|
|
364
|
+
def code?: () -> bool
|
|
365
|
+
def subscript?: () -> bool
|
|
366
|
+
def superscript?: () -> bool
|
|
367
|
+
def highlight?: () -> bool
|
|
368
|
+
def link?: () -> bool
|
|
369
|
+
|
|
370
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
371
|
+
def self.new: -> AnnotationKindStrikethrough
|
|
372
|
+
end
|
|
373
|
+
|
|
374
|
+
class AnnotationKindCode
|
|
375
|
+
include AnnotationKind
|
|
376
|
+
def bold?: () -> bool
|
|
377
|
+
def italic?: () -> bool
|
|
378
|
+
def underline?: () -> bool
|
|
379
|
+
def strikethrough?: () -> bool
|
|
380
|
+
def code?: () -> bool
|
|
381
|
+
def subscript?: () -> bool
|
|
382
|
+
def superscript?: () -> bool
|
|
383
|
+
def highlight?: () -> bool
|
|
384
|
+
def link?: () -> bool
|
|
385
|
+
|
|
386
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
387
|
+
def self.new: -> AnnotationKindCode
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
class AnnotationKindSubscript
|
|
391
|
+
include AnnotationKind
|
|
392
|
+
def bold?: () -> bool
|
|
393
|
+
def italic?: () -> bool
|
|
394
|
+
def underline?: () -> bool
|
|
395
|
+
def strikethrough?: () -> bool
|
|
396
|
+
def code?: () -> bool
|
|
397
|
+
def subscript?: () -> bool
|
|
398
|
+
def superscript?: () -> bool
|
|
399
|
+
def highlight?: () -> bool
|
|
400
|
+
def link?: () -> bool
|
|
401
|
+
|
|
402
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
403
|
+
def self.new: -> AnnotationKindSubscript
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
class AnnotationKindSuperscript
|
|
407
|
+
include AnnotationKind
|
|
408
|
+
def bold?: () -> bool
|
|
409
|
+
def italic?: () -> bool
|
|
410
|
+
def underline?: () -> bool
|
|
411
|
+
def strikethrough?: () -> bool
|
|
412
|
+
def code?: () -> bool
|
|
413
|
+
def subscript?: () -> bool
|
|
414
|
+
def superscript?: () -> bool
|
|
415
|
+
def highlight?: () -> bool
|
|
416
|
+
def link?: () -> bool
|
|
417
|
+
|
|
418
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
419
|
+
def self.new: -> AnnotationKindSuperscript
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
class AnnotationKindHighlight
|
|
423
|
+
include AnnotationKind
|
|
424
|
+
def bold?: () -> bool
|
|
425
|
+
def italic?: () -> bool
|
|
426
|
+
def underline?: () -> bool
|
|
427
|
+
def strikethrough?: () -> bool
|
|
428
|
+
def code?: () -> bool
|
|
429
|
+
def subscript?: () -> bool
|
|
430
|
+
def superscript?: () -> bool
|
|
431
|
+
def highlight?: () -> bool
|
|
432
|
+
def link?: () -> bool
|
|
433
|
+
|
|
434
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
435
|
+
def self.new: -> AnnotationKindHighlight
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
class AnnotationKindLink
|
|
439
|
+
include AnnotationKind
|
|
440
|
+
attr_reader url: String
|
|
441
|
+
attr_reader title: String?
|
|
442
|
+
|
|
443
|
+
def bold?: () -> bool
|
|
444
|
+
def italic?: () -> bool
|
|
445
|
+
def underline?: () -> bool
|
|
446
|
+
def strikethrough?: () -> bool
|
|
447
|
+
def code?: () -> bool
|
|
448
|
+
def subscript?: () -> bool
|
|
449
|
+
def superscript?: () -> bool
|
|
450
|
+
def highlight?: () -> bool
|
|
451
|
+
def link?: () -> bool
|
|
452
|
+
|
|
453
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
454
|
+
def self.new: (url: String, title: String) -> AnnotationKindLink
|
|
307
455
|
end
|
|
308
456
|
|
|
309
457
|
type enum_CodeBlockStyle = :Indented | :Backticks | :Tildes
|
|
@@ -326,7 +474,298 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
|
|
|
326
474
|
|
|
327
475
|
type enum_NewlineStyle = :Spaces | :Backslash
|
|
328
476
|
|
|
329
|
-
|
|
477
|
+
module NodeContent
|
|
478
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
479
|
+
end
|
|
480
|
+
|
|
481
|
+
class NodeContentHeading
|
|
482
|
+
include NodeContent
|
|
483
|
+
attr_reader level: Integer
|
|
484
|
+
attr_reader text: String
|
|
485
|
+
|
|
486
|
+
def heading?: () -> bool
|
|
487
|
+
def paragraph?: () -> bool
|
|
488
|
+
def list?: () -> bool
|
|
489
|
+
def list_item?: () -> bool
|
|
490
|
+
def table?: () -> bool
|
|
491
|
+
def image?: () -> bool
|
|
492
|
+
def code?: () -> bool
|
|
493
|
+
def quote?: () -> bool
|
|
494
|
+
def definition_list?: () -> bool
|
|
495
|
+
def definition_item?: () -> bool
|
|
496
|
+
def raw_block?: () -> bool
|
|
497
|
+
def metadata_block?: () -> bool
|
|
498
|
+
def group?: () -> bool
|
|
499
|
+
|
|
500
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
501
|
+
def self.new: (level: Integer, text: String) -> NodeContentHeading
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
class NodeContentParagraph
|
|
505
|
+
include NodeContent
|
|
506
|
+
attr_reader text: String
|
|
507
|
+
|
|
508
|
+
def heading?: () -> bool
|
|
509
|
+
def paragraph?: () -> bool
|
|
510
|
+
def list?: () -> bool
|
|
511
|
+
def list_item?: () -> bool
|
|
512
|
+
def table?: () -> bool
|
|
513
|
+
def image?: () -> bool
|
|
514
|
+
def code?: () -> bool
|
|
515
|
+
def quote?: () -> bool
|
|
516
|
+
def definition_list?: () -> bool
|
|
517
|
+
def definition_item?: () -> bool
|
|
518
|
+
def raw_block?: () -> bool
|
|
519
|
+
def metadata_block?: () -> bool
|
|
520
|
+
def group?: () -> bool
|
|
521
|
+
|
|
522
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
523
|
+
def self.new: (text: String) -> NodeContentParagraph
|
|
524
|
+
end
|
|
525
|
+
|
|
526
|
+
class NodeContentList
|
|
527
|
+
include NodeContent
|
|
528
|
+
attr_reader ordered: bool
|
|
529
|
+
|
|
530
|
+
def heading?: () -> bool
|
|
531
|
+
def paragraph?: () -> bool
|
|
532
|
+
def list?: () -> bool
|
|
533
|
+
def list_item?: () -> bool
|
|
534
|
+
def table?: () -> bool
|
|
535
|
+
def image?: () -> bool
|
|
536
|
+
def code?: () -> bool
|
|
537
|
+
def quote?: () -> bool
|
|
538
|
+
def definition_list?: () -> bool
|
|
539
|
+
def definition_item?: () -> bool
|
|
540
|
+
def raw_block?: () -> bool
|
|
541
|
+
def metadata_block?: () -> bool
|
|
542
|
+
def group?: () -> bool
|
|
543
|
+
|
|
544
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
545
|
+
def self.new: (ordered: bool) -> NodeContentList
|
|
546
|
+
end
|
|
547
|
+
|
|
548
|
+
class NodeContentListItem
|
|
549
|
+
include NodeContent
|
|
550
|
+
attr_reader text: String
|
|
551
|
+
|
|
552
|
+
def heading?: () -> bool
|
|
553
|
+
def paragraph?: () -> bool
|
|
554
|
+
def list?: () -> bool
|
|
555
|
+
def list_item?: () -> bool
|
|
556
|
+
def table?: () -> bool
|
|
557
|
+
def image?: () -> bool
|
|
558
|
+
def code?: () -> bool
|
|
559
|
+
def quote?: () -> bool
|
|
560
|
+
def definition_list?: () -> bool
|
|
561
|
+
def definition_item?: () -> bool
|
|
562
|
+
def raw_block?: () -> bool
|
|
563
|
+
def metadata_block?: () -> bool
|
|
564
|
+
def group?: () -> bool
|
|
565
|
+
|
|
566
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
567
|
+
def self.new: (text: String) -> NodeContentListItem
|
|
568
|
+
end
|
|
569
|
+
|
|
570
|
+
class NodeContentTable
|
|
571
|
+
include NodeContent
|
|
572
|
+
attr_reader grid: TableGrid
|
|
573
|
+
|
|
574
|
+
def heading?: () -> bool
|
|
575
|
+
def paragraph?: () -> bool
|
|
576
|
+
def list?: () -> bool
|
|
577
|
+
def list_item?: () -> bool
|
|
578
|
+
def table?: () -> bool
|
|
579
|
+
def image?: () -> bool
|
|
580
|
+
def code?: () -> bool
|
|
581
|
+
def quote?: () -> bool
|
|
582
|
+
def definition_list?: () -> bool
|
|
583
|
+
def definition_item?: () -> bool
|
|
584
|
+
def raw_block?: () -> bool
|
|
585
|
+
def metadata_block?: () -> bool
|
|
586
|
+
def group?: () -> bool
|
|
587
|
+
|
|
588
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
589
|
+
def self.new: (grid: TableGrid) -> NodeContentTable
|
|
590
|
+
end
|
|
591
|
+
|
|
592
|
+
class NodeContentImage
|
|
593
|
+
include NodeContent
|
|
594
|
+
attr_reader description: String?
|
|
595
|
+
attr_reader src: String?
|
|
596
|
+
attr_reader image_index: Integer?
|
|
597
|
+
|
|
598
|
+
def heading?: () -> bool
|
|
599
|
+
def paragraph?: () -> bool
|
|
600
|
+
def list?: () -> bool
|
|
601
|
+
def list_item?: () -> bool
|
|
602
|
+
def table?: () -> bool
|
|
603
|
+
def image?: () -> bool
|
|
604
|
+
def code?: () -> bool
|
|
605
|
+
def quote?: () -> bool
|
|
606
|
+
def definition_list?: () -> bool
|
|
607
|
+
def definition_item?: () -> bool
|
|
608
|
+
def raw_block?: () -> bool
|
|
609
|
+
def metadata_block?: () -> bool
|
|
610
|
+
def group?: () -> bool
|
|
611
|
+
|
|
612
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
613
|
+
def self.new: (description: String, src: String, image_index: Integer) -> NodeContentImage
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
class NodeContentCode
|
|
617
|
+
include NodeContent
|
|
618
|
+
attr_reader text: String
|
|
619
|
+
attr_reader language: String?
|
|
620
|
+
|
|
621
|
+
def heading?: () -> bool
|
|
622
|
+
def paragraph?: () -> bool
|
|
623
|
+
def list?: () -> bool
|
|
624
|
+
def list_item?: () -> bool
|
|
625
|
+
def table?: () -> bool
|
|
626
|
+
def image?: () -> bool
|
|
627
|
+
def code?: () -> bool
|
|
628
|
+
def quote?: () -> bool
|
|
629
|
+
def definition_list?: () -> bool
|
|
630
|
+
def definition_item?: () -> bool
|
|
631
|
+
def raw_block?: () -> bool
|
|
632
|
+
def metadata_block?: () -> bool
|
|
633
|
+
def group?: () -> bool
|
|
634
|
+
|
|
635
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
636
|
+
def self.new: (text: String, language: String) -> NodeContentCode
|
|
637
|
+
end
|
|
638
|
+
|
|
639
|
+
class NodeContentQuote
|
|
640
|
+
include NodeContent
|
|
641
|
+
def heading?: () -> bool
|
|
642
|
+
def paragraph?: () -> bool
|
|
643
|
+
def list?: () -> bool
|
|
644
|
+
def list_item?: () -> bool
|
|
645
|
+
def table?: () -> bool
|
|
646
|
+
def image?: () -> bool
|
|
647
|
+
def code?: () -> bool
|
|
648
|
+
def quote?: () -> bool
|
|
649
|
+
def definition_list?: () -> bool
|
|
650
|
+
def definition_item?: () -> bool
|
|
651
|
+
def raw_block?: () -> bool
|
|
652
|
+
def metadata_block?: () -> bool
|
|
653
|
+
def group?: () -> bool
|
|
654
|
+
|
|
655
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
656
|
+
def self.new: -> NodeContentQuote
|
|
657
|
+
end
|
|
658
|
+
|
|
659
|
+
class NodeContentDefinitionList
|
|
660
|
+
include NodeContent
|
|
661
|
+
def heading?: () -> bool
|
|
662
|
+
def paragraph?: () -> bool
|
|
663
|
+
def list?: () -> bool
|
|
664
|
+
def list_item?: () -> bool
|
|
665
|
+
def table?: () -> bool
|
|
666
|
+
def image?: () -> bool
|
|
667
|
+
def code?: () -> bool
|
|
668
|
+
def quote?: () -> bool
|
|
669
|
+
def definition_list?: () -> bool
|
|
670
|
+
def definition_item?: () -> bool
|
|
671
|
+
def raw_block?: () -> bool
|
|
672
|
+
def metadata_block?: () -> bool
|
|
673
|
+
def group?: () -> bool
|
|
674
|
+
|
|
675
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
676
|
+
def self.new: -> NodeContentDefinitionList
|
|
677
|
+
end
|
|
678
|
+
|
|
679
|
+
class NodeContentDefinitionItem
|
|
680
|
+
include NodeContent
|
|
681
|
+
attr_reader term: String
|
|
682
|
+
attr_reader definition: String
|
|
683
|
+
|
|
684
|
+
def heading?: () -> bool
|
|
685
|
+
def paragraph?: () -> bool
|
|
686
|
+
def list?: () -> bool
|
|
687
|
+
def list_item?: () -> bool
|
|
688
|
+
def table?: () -> bool
|
|
689
|
+
def image?: () -> bool
|
|
690
|
+
def code?: () -> bool
|
|
691
|
+
def quote?: () -> bool
|
|
692
|
+
def definition_list?: () -> bool
|
|
693
|
+
def definition_item?: () -> bool
|
|
694
|
+
def raw_block?: () -> bool
|
|
695
|
+
def metadata_block?: () -> bool
|
|
696
|
+
def group?: () -> bool
|
|
697
|
+
|
|
698
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
699
|
+
def self.new: (term: String, definition: String) -> NodeContentDefinitionItem
|
|
700
|
+
end
|
|
701
|
+
|
|
702
|
+
class NodeContentRawBlock
|
|
703
|
+
include NodeContent
|
|
704
|
+
attr_reader format: String
|
|
705
|
+
attr_reader content: String
|
|
706
|
+
|
|
707
|
+
def heading?: () -> bool
|
|
708
|
+
def paragraph?: () -> bool
|
|
709
|
+
def list?: () -> bool
|
|
710
|
+
def list_item?: () -> bool
|
|
711
|
+
def table?: () -> bool
|
|
712
|
+
def image?: () -> bool
|
|
713
|
+
def code?: () -> bool
|
|
714
|
+
def quote?: () -> bool
|
|
715
|
+
def definition_list?: () -> bool
|
|
716
|
+
def definition_item?: () -> bool
|
|
717
|
+
def raw_block?: () -> bool
|
|
718
|
+
def metadata_block?: () -> bool
|
|
719
|
+
def group?: () -> bool
|
|
720
|
+
|
|
721
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
722
|
+
def self.new: (format: String, content: String) -> NodeContentRawBlock
|
|
723
|
+
end
|
|
724
|
+
|
|
725
|
+
class NodeContentMetadataBlock
|
|
726
|
+
include NodeContent
|
|
727
|
+
attr_reader entries: Array[MetadataEntry]
|
|
728
|
+
|
|
729
|
+
def heading?: () -> bool
|
|
730
|
+
def paragraph?: () -> bool
|
|
731
|
+
def list?: () -> bool
|
|
732
|
+
def list_item?: () -> bool
|
|
733
|
+
def table?: () -> bool
|
|
734
|
+
def image?: () -> bool
|
|
735
|
+
def code?: () -> bool
|
|
736
|
+
def quote?: () -> bool
|
|
737
|
+
def definition_list?: () -> bool
|
|
738
|
+
def definition_item?: () -> bool
|
|
739
|
+
def raw_block?: () -> bool
|
|
740
|
+
def metadata_block?: () -> bool
|
|
741
|
+
def group?: () -> bool
|
|
742
|
+
|
|
743
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
744
|
+
def self.new: (entries: Array[MetadataEntry]) -> NodeContentMetadataBlock
|
|
745
|
+
end
|
|
746
|
+
|
|
747
|
+
class NodeContentGroup
|
|
748
|
+
include NodeContent
|
|
749
|
+
attr_reader label: String?
|
|
750
|
+
attr_reader heading_level: Integer?
|
|
751
|
+
attr_reader heading_text: String?
|
|
752
|
+
|
|
753
|
+
def heading?: () -> bool
|
|
754
|
+
def paragraph?: () -> bool
|
|
755
|
+
def list?: () -> bool
|
|
756
|
+
def list_item?: () -> bool
|
|
757
|
+
def table?: () -> bool
|
|
758
|
+
def image?: () -> bool
|
|
759
|
+
def code?: () -> bool
|
|
760
|
+
def quote?: () -> bool
|
|
761
|
+
def definition_list?: () -> bool
|
|
762
|
+
def definition_item?: () -> bool
|
|
763
|
+
def raw_block?: () -> bool
|
|
764
|
+
def metadata_block?: () -> bool
|
|
765
|
+
def group?: () -> bool
|
|
766
|
+
|
|
767
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
768
|
+
def self.new: (label: String, heading_level: Integer, heading_text: String) -> NodeContentGroup
|
|
330
769
|
end
|
|
331
770
|
|
|
332
771
|
type enum_NodeType = :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
|
|
@@ -343,7 +782,72 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
|
|
|
343
782
|
|
|
344
783
|
type enum_UrlEscapeStyle = :Angle | :Percent
|
|
345
784
|
|
|
346
|
-
|
|
785
|
+
module VisitResult
|
|
786
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
787
|
+
end
|
|
788
|
+
|
|
789
|
+
class VisitResultContinue
|
|
790
|
+
include VisitResult
|
|
791
|
+
def continue?: () -> bool
|
|
792
|
+
def custom?: () -> bool
|
|
793
|
+
def skip?: () -> bool
|
|
794
|
+
def preserve_html?: () -> bool
|
|
795
|
+
def error?: () -> bool
|
|
796
|
+
|
|
797
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
798
|
+
def self.new: -> VisitResultContinue
|
|
799
|
+
end
|
|
800
|
+
|
|
801
|
+
class VisitResultCustom
|
|
802
|
+
include VisitResult
|
|
803
|
+
attr_reader value: String
|
|
804
|
+
|
|
805
|
+
def continue?: () -> bool
|
|
806
|
+
def custom?: () -> bool
|
|
807
|
+
def skip?: () -> bool
|
|
808
|
+
def preserve_html?: () -> bool
|
|
809
|
+
def error?: () -> bool
|
|
810
|
+
|
|
811
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
812
|
+
def self.new: (value: String) -> VisitResultCustom
|
|
813
|
+
end
|
|
814
|
+
|
|
815
|
+
class VisitResultSkip
|
|
816
|
+
include VisitResult
|
|
817
|
+
def continue?: () -> bool
|
|
818
|
+
def custom?: () -> bool
|
|
819
|
+
def skip?: () -> bool
|
|
820
|
+
def preserve_html?: () -> bool
|
|
821
|
+
def error?: () -> bool
|
|
822
|
+
|
|
823
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
824
|
+
def self.new: -> VisitResultSkip
|
|
825
|
+
end
|
|
826
|
+
|
|
827
|
+
class VisitResultPreserveHtml
|
|
828
|
+
include VisitResult
|
|
829
|
+
def continue?: () -> bool
|
|
830
|
+
def custom?: () -> bool
|
|
831
|
+
def skip?: () -> bool
|
|
832
|
+
def preserve_html?: () -> bool
|
|
833
|
+
def error?: () -> bool
|
|
834
|
+
|
|
835
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
836
|
+
def self.new: -> VisitResultPreserveHtml
|
|
837
|
+
end
|
|
838
|
+
|
|
839
|
+
class VisitResultError
|
|
840
|
+
include VisitResult
|
|
841
|
+
attr_reader value: String
|
|
842
|
+
|
|
843
|
+
def continue?: () -> bool
|
|
844
|
+
def custom?: () -> bool
|
|
845
|
+
def skip?: () -> bool
|
|
846
|
+
def preserve_html?: () -> bool
|
|
847
|
+
def error?: () -> bool
|
|
848
|
+
|
|
849
|
+
def self.from_hash: (untyped hash) -> untyped
|
|
850
|
+
def self.new: (value: String) -> VisitResultError
|
|
347
851
|
end
|
|
348
852
|
|
|
349
853
|
type enum_WarningKind = :image_extraction_failed | :encoding_fallback | :truncated_input | :malformed_html | :sanitization_applied | :depth_limit_exceeded
|
|
@@ -352,6 +856,8 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
|
|
|
352
856
|
|
|
353
857
|
def self.convert: (String html, ?ConversionOptions options) -> ConversionResult
|
|
354
858
|
|
|
859
|
+
def self.convert_with_accessible_names: (String html, bool use_accessible_names, ?ConversionOptions options) -> ConversionResult
|
|
860
|
+
|
|
355
861
|
interface _HtmlVisitor
|
|
356
862
|
# Optional methods the bridge calls when the object defines them (the
|
|
357
863
|
# trait's Rust default behavior applies otherwise): visit_text, visit_element_start, visit_element_end, visit_link, visit_image, visit_heading, visit_code_block, visit_code_inline, visit_list_item, visit_list_start, visit_list_end, visit_table_start, visit_table_row, visit_table_end, visit_blockquote, visit_strong, visit_emphasis, visit_strikethrough, visit_underline, visit_subscript, visit_superscript, visit_mark, visit_line_break, visit_horizontal_rule, visit_custom_element, visit_definition_list_start, visit_definition_term, visit_definition_description, visit_definition_list_end, visit_form, visit_input, visit_button, visit_audio, visit_video, visit_iframe, visit_details, visit_summary, visit_figure_start, visit_figcaption, visit_figure_end.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html-to-markdown
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.19.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-10-
|
|
12
|
+
date: 2026-10-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rb_sys
|