html-to-markdown 3.15.0 → 3.16.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 +15 -15
- data/ext/html_to_markdown_rb/native/Cargo.toml +3 -3
- data/ext/html_to_markdown_rb/src/lib.rs +111 -1
- data/lib/html_to_markdown/version.rb +2 -2
- data/sig/types.rbs +7 -3
- 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: 8de853571f92ca7f37774b63db6d2348c505919cd43b9fb25b250a2a21206b8f
|
|
4
|
+
data.tar.gz: efd5431417618cecdf86c8a4f00fd4456c71c441dae449d28e967244d6ef023e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae9e03f4cf1e5177f4ff86edf3bc88779a12eb4ed184128b5c4d2ed5d60bdceed2fb10df37075e1ab643c05c69229543216a5e267074ee95823e70f834188216
|
|
7
|
+
data.tar.gz: 337c1ada4ab8b534b62b822fef53e9ce605561a40483a975799a2b9afa9a304d8654f5b7dce3924c15bc22a3a823f008603a2840ca57321b8955acc89e7b3066
|
|
@@ -252,7 +252,7 @@ checksum = "c9356095b4b41197bba32173600e1582792cda618f65d12f68e2e77d273413c5"
|
|
|
252
252
|
|
|
253
253
|
[[package]]
|
|
254
254
|
name = "html-to-markdown-rb"
|
|
255
|
-
version = "3.
|
|
255
|
+
version = "3.16.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.16.0"
|
|
270
270
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
271
|
-
checksum = "
|
|
271
|
+
checksum = "74c4d770081ede1c6ec100e61a57cac65bf41d28ab5516b1eae907b9f3415778"
|
|
272
272
|
dependencies = [
|
|
273
273
|
"ahash",
|
|
274
274
|
"astral-tl",
|
|
@@ -448,9 +448,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
|
448
448
|
|
|
449
449
|
[[package]]
|
|
450
450
|
name = "lazy_static"
|
|
451
|
-
version = "1.5.
|
|
451
|
+
version = "1.5.1"
|
|
452
452
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
453
|
-
checksum = "
|
|
453
|
+
checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
|
|
454
454
|
|
|
455
455
|
[[package]]
|
|
456
456
|
name = "libc"
|
|
@@ -491,9 +491,9 @@ checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
|
|
|
491
491
|
|
|
492
492
|
[[package]]
|
|
493
493
|
name = "magnus"
|
|
494
|
-
version = "0.9.
|
|
494
|
+
version = "0.9.1"
|
|
495
495
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
496
|
-
checksum = "
|
|
496
|
+
checksum = "4c01bef153b8d0f086991f0e166474a1d57b738221f9a9c11405d498ac95a44d"
|
|
497
497
|
dependencies = [
|
|
498
498
|
"magnus-macros",
|
|
499
499
|
"rb-sys",
|
|
@@ -503,9 +503,9 @@ dependencies = [
|
|
|
503
503
|
|
|
504
504
|
[[package]]
|
|
505
505
|
name = "magnus-macros"
|
|
506
|
-
version = "0.9.
|
|
506
|
+
version = "0.9.1"
|
|
507
507
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
508
|
-
checksum = "
|
|
508
|
+
checksum = "9dafde2eeb66f090e0f326112323eb8324b12cb32b5d1210e541d3df6b0ce77e"
|
|
509
509
|
dependencies = [
|
|
510
510
|
"proc-macro2",
|
|
511
511
|
"quote",
|
|
@@ -1131,9 +1131,9 @@ dependencies = [
|
|
|
1131
1131
|
|
|
1132
1132
|
[[package]]
|
|
1133
1133
|
name = "yoke-derive"
|
|
1134
|
-
version = "0.8.
|
|
1134
|
+
version = "0.8.4"
|
|
1135
1135
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1136
|
-
checksum = "
|
|
1136
|
+
checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71"
|
|
1137
1137
|
dependencies = [
|
|
1138
1138
|
"proc-macro2",
|
|
1139
1139
|
"quote",
|
|
@@ -1143,18 +1143,18 @@ dependencies = [
|
|
|
1143
1143
|
|
|
1144
1144
|
[[package]]
|
|
1145
1145
|
name = "zerocopy"
|
|
1146
|
-
version = "0.8.
|
|
1146
|
+
version = "0.8.59"
|
|
1147
1147
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1148
|
-
checksum = "
|
|
1148
|
+
checksum = "6df92bf3d9227be3d53173901ddbffac2babc27ae50f397776ffd6dc33f800cb"
|
|
1149
1149
|
dependencies = [
|
|
1150
1150
|
"zerocopy-derive",
|
|
1151
1151
|
]
|
|
1152
1152
|
|
|
1153
1153
|
[[package]]
|
|
1154
1154
|
name = "zerocopy-derive"
|
|
1155
|
-
version = "0.8.
|
|
1155
|
+
version = "0.8.59"
|
|
1156
1156
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1157
|
-
checksum = "
|
|
1157
|
+
checksum = "ac4f328cf2f05d084e496c3e9c3f33ed0a183656a16e1fcec4d464d8373aec82"
|
|
1158
1158
|
dependencies = [
|
|
1159
1159
|
"proc-macro2",
|
|
1160
1160
|
"quote",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:b55cf956fd88e14111a54d783edfd335d4ab5ae57ebcc23cdddbb67a1ee0dc96
|
|
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.16.0"
|
|
9
9
|
edition = "2024"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
description = "High-performance HTML to Markdown converter"
|
|
@@ -30,7 +30,7 @@ visitor = ["html-to-markdown-rs/visitor"]
|
|
|
30
30
|
|
|
31
31
|
[dependencies]
|
|
32
32
|
async-trait = "0.1"
|
|
33
|
-
html-to-markdown-rs = { version = "3.
|
|
33
|
+
html-to-markdown-rs = { version = "3.16.0", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
|
|
34
34
|
magnus = "0.9"
|
|
35
35
|
rb-sys = ">=0.9.130, <0.10"
|
|
36
36
|
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:ef17e73c4a8ab3ab7874d1b469b3b0bfa02b61db141c8db6976ce5dd46217c8f
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -94,6 +94,7 @@ pub struct ConversionOptions {
|
|
|
94
94
|
strip_tags: Vec<String>,
|
|
95
95
|
preserve_tags: Vec<String>,
|
|
96
96
|
skip_images: bool,
|
|
97
|
+
inline_data_media: InlineDataMedia,
|
|
97
98
|
url_escape_style: UrlEscapeStyle,
|
|
98
99
|
link_style: LinkStyle,
|
|
99
100
|
output_format: OutputFormat,
|
|
@@ -437,6 +438,15 @@ impl ConversionOptions {
|
|
|
437
438
|
})?,
|
|
438
439
|
None => false,
|
|
439
440
|
},
|
|
441
|
+
inline_data_media: match kwargs.get(ruby.to_symbol("inline_data_media")) {
|
|
442
|
+
Some(v) => InlineDataMedia::try_convert(v).map_err(|e| {
|
|
443
|
+
magnus::Error::new(
|
|
444
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
445
|
+
format!("invalid value for `inline_data_media`: {}", e),
|
|
446
|
+
)
|
|
447
|
+
})?,
|
|
448
|
+
None => InlineDataMedia::Keep,
|
|
449
|
+
},
|
|
440
450
|
url_escape_style: match kwargs.get(ruby.to_symbol("url_escape_style")) {
|
|
441
451
|
Some(v) => UrlEscapeStyle::try_convert(v).map_err(|e| {
|
|
442
452
|
magnus::Error::new(
|
|
@@ -676,6 +686,10 @@ impl ConversionOptions {
|
|
|
676
686
|
self.skip_images
|
|
677
687
|
}
|
|
678
688
|
|
|
689
|
+
fn inline_data_media(&self) -> InlineDataMedia {
|
|
690
|
+
self.inline_data_media.clone()
|
|
691
|
+
}
|
|
692
|
+
|
|
679
693
|
fn url_escape_style(&self) -> UrlEscapeStyle {
|
|
680
694
|
self.url_escape_style.clone()
|
|
681
695
|
}
|
|
@@ -761,6 +775,7 @@ pub struct ConversionOptionsUpdate {
|
|
|
761
775
|
strip_tags: Option<Vec<String>>,
|
|
762
776
|
preserve_tags: Option<Vec<String>>,
|
|
763
777
|
skip_images: Option<bool>,
|
|
778
|
+
inline_data_media: Option<InlineDataMedia>,
|
|
764
779
|
url_escape_style: Option<UrlEscapeStyle>,
|
|
765
780
|
link_style: Option<LinkStyle>,
|
|
766
781
|
output_format: Option<OutputFormat>,
|
|
@@ -1107,6 +1122,15 @@ impl ConversionOptionsUpdate {
|
|
|
1107
1122
|
})?),
|
|
1108
1123
|
None => None,
|
|
1109
1124
|
},
|
|
1125
|
+
inline_data_media: match kwargs.get(ruby.to_symbol("inline_data_media")).filter(|v| !v.is_nil()) {
|
|
1126
|
+
Some(v) => Some(InlineDataMedia::try_convert(v).map_err(|e| {
|
|
1127
|
+
magnus::Error::new(
|
|
1128
|
+
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
1129
|
+
format!("invalid value for `inline_data_media`: {}", e),
|
|
1130
|
+
)
|
|
1131
|
+
})?),
|
|
1132
|
+
None => None,
|
|
1133
|
+
},
|
|
1110
1134
|
url_escape_style: match kwargs.get(ruby.to_symbol("url_escape_style")).filter(|v| !v.is_nil()) {
|
|
1111
1135
|
Some(v) => Some(UrlEscapeStyle::try_convert(v).map_err(|e| {
|
|
1112
1136
|
magnus::Error::new(
|
|
@@ -1349,6 +1373,10 @@ impl ConversionOptionsUpdate {
|
|
|
1349
1373
|
self.skip_images
|
|
1350
1374
|
}
|
|
1351
1375
|
|
|
1376
|
+
fn inline_data_media(&self) -> Option<InlineDataMedia> {
|
|
1377
|
+
self.inline_data_media.clone()
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1352
1380
|
fn url_escape_style(&self) -> Option<UrlEscapeStyle> {
|
|
1353
1381
|
self.url_escape_style.clone()
|
|
1354
1382
|
}
|
|
@@ -3921,6 +3949,58 @@ impl magnus::TryConvert for ImageType {
|
|
|
3921
3949
|
unsafe impl IntoValueFromNative for ImageType {}
|
|
3922
3950
|
unsafe impl TryConvertOwned for ImageType {}
|
|
3923
3951
|
|
|
3952
|
+
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
|
|
3953
|
+
pub enum InlineDataMedia {
|
|
3954
|
+
Keep,
|
|
3955
|
+
AltTextOnly,
|
|
3956
|
+
DropElement,
|
|
3957
|
+
}
|
|
3958
|
+
|
|
3959
|
+
impl Default for InlineDataMedia {
|
|
3960
|
+
fn default() -> Self {
|
|
3961
|
+
Self::Keep
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
|
|
3965
|
+
impl magnus::IntoValue for InlineDataMedia {
|
|
3966
|
+
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
3967
|
+
let sym = match self {
|
|
3968
|
+
InlineDataMedia::Keep => "Keep",
|
|
3969
|
+
InlineDataMedia::AltTextOnly => "AltTextOnly",
|
|
3970
|
+
InlineDataMedia::DropElement => "DropElement",
|
|
3971
|
+
};
|
|
3972
|
+
handle.to_symbol(sym).into_value_with(handle)
|
|
3973
|
+
}
|
|
3974
|
+
}
|
|
3975
|
+
|
|
3976
|
+
impl magnus::TryConvert for InlineDataMedia {
|
|
3977
|
+
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3978
|
+
// IntoValue emits Symbols, including when this enum is a Hash key.
|
|
3979
|
+
// Accept that exact representation as well as String inputs; do not
|
|
3980
|
+
// coerce arbitrary objects through to_s.
|
|
3981
|
+
let s: String = if let Some(symbol) = magnus::Symbol::from_value(val) {
|
|
3982
|
+
symbol.name()?.into_owned()
|
|
3983
|
+
} else {
|
|
3984
|
+
magnus::TryConvert::try_convert(val)?
|
|
3985
|
+
};
|
|
3986
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3987
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3988
|
+
// existing consumer code written in any of those styles keep working.
|
|
3989
|
+
match s.as_str() {
|
|
3990
|
+
"Keep" | "keep" => Ok(InlineDataMedia::Keep),
|
|
3991
|
+
"AltTextOnly" | "alt_text_only" => Ok(InlineDataMedia::AltTextOnly),
|
|
3992
|
+
"DropElement" | "drop_element" => Ok(InlineDataMedia::DropElement),
|
|
3993
|
+
other => Err(magnus::Error::new(
|
|
3994
|
+
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
3995
|
+
format!("invalid InlineDataMedia value: {other}"),
|
|
3996
|
+
)),
|
|
3997
|
+
}
|
|
3998
|
+
}
|
|
3999
|
+
}
|
|
4000
|
+
|
|
4001
|
+
unsafe impl IntoValueFromNative for InlineDataMedia {}
|
|
4002
|
+
unsafe impl TryConvertOwned for InlineDataMedia {}
|
|
4003
|
+
|
|
3924
4004
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
|
|
3925
4005
|
pub enum LinkStyle {
|
|
3926
4006
|
Inline,
|
|
@@ -6817,6 +6897,7 @@ impl From<ConversionOptions> for html_to_markdown_rs::options::ConversionOptions
|
|
|
6817
6897
|
strip_tags: val.strip_tags.into_iter().collect(),
|
|
6818
6898
|
preserve_tags: val.preserve_tags.into_iter().collect(),
|
|
6819
6899
|
skip_images: val.skip_images,
|
|
6900
|
+
inline_data_media: val.inline_data_media.into(),
|
|
6820
6901
|
url_escape_style: val.url_escape_style.into(),
|
|
6821
6902
|
link_style: val.link_style.into(),
|
|
6822
6903
|
output_format: val.output_format.into(),
|
|
@@ -6870,6 +6951,7 @@ impl From<html_to_markdown_rs::options::ConversionOptions> for ConversionOptions
|
|
|
6870
6951
|
strip_tags: val.strip_tags.into_iter().collect(),
|
|
6871
6952
|
preserve_tags: val.preserve_tags.into_iter().collect(),
|
|
6872
6953
|
skip_images: val.skip_images,
|
|
6954
|
+
inline_data_media: val.inline_data_media.into(),
|
|
6873
6955
|
url_escape_style: val.url_escape_style.into(),
|
|
6874
6956
|
link_style: val.link_style.into(),
|
|
6875
6957
|
output_format: val.output_format.into(),
|
|
@@ -6922,6 +7004,7 @@ impl From<html_to_markdown_rs::options::ConversionOptionsUpdate> for ConversionO
|
|
|
6922
7004
|
strip_tags: val.strip_tags.map(|v| v.into_iter().collect()),
|
|
6923
7005
|
preserve_tags: val.preserve_tags.map(|v| v.into_iter().collect()),
|
|
6924
7006
|
skip_images: val.skip_images,
|
|
7007
|
+
inline_data_media: val.inline_data_media.map(Into::into),
|
|
6925
7008
|
url_escape_style: val.url_escape_style.map(Into::into),
|
|
6926
7009
|
link_style: val.link_style.map(Into::into),
|
|
6927
7010
|
output_format: val.output_format.map(Into::into),
|
|
@@ -7559,6 +7642,26 @@ impl From<html_to_markdown_rs::metadata::ImageType> for ImageType {
|
|
|
7559
7642
|
}
|
|
7560
7643
|
}
|
|
7561
7644
|
|
|
7645
|
+
impl From<InlineDataMedia> for html_to_markdown_rs::options::InlineDataMedia {
|
|
7646
|
+
fn from(val: InlineDataMedia) -> Self {
|
|
7647
|
+
match val {
|
|
7648
|
+
InlineDataMedia::Keep => Self::Keep,
|
|
7649
|
+
InlineDataMedia::AltTextOnly => Self::AltTextOnly,
|
|
7650
|
+
InlineDataMedia::DropElement => Self::DropElement,
|
|
7651
|
+
}
|
|
7652
|
+
}
|
|
7653
|
+
}
|
|
7654
|
+
|
|
7655
|
+
impl From<html_to_markdown_rs::options::InlineDataMedia> for InlineDataMedia {
|
|
7656
|
+
fn from(val: html_to_markdown_rs::options::InlineDataMedia) -> Self {
|
|
7657
|
+
match val {
|
|
7658
|
+
html_to_markdown_rs::options::InlineDataMedia::Keep => Self::Keep,
|
|
7659
|
+
html_to_markdown_rs::options::InlineDataMedia::AltTextOnly => Self::AltTextOnly,
|
|
7660
|
+
html_to_markdown_rs::options::InlineDataMedia::DropElement => Self::DropElement,
|
|
7661
|
+
}
|
|
7662
|
+
}
|
|
7663
|
+
}
|
|
7664
|
+
|
|
7562
7665
|
impl From<LinkStyle> for html_to_markdown_rs::options::LinkStyle {
|
|
7563
7666
|
fn from(val: LinkStyle) -> Self {
|
|
7564
7667
|
match val {
|
|
@@ -8200,6 +8303,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
8200
8303
|
|
|
8201
8304
|
class.define_method("skip_images", method!(ConversionOptions::skip_images, 0))?;
|
|
8202
8305
|
|
|
8306
|
+
class.define_method("inline_data_media", method!(ConversionOptions::inline_data_media, 0))?;
|
|
8307
|
+
|
|
8203
8308
|
class.define_method("url_escape_style", method!(ConversionOptions::url_escape_style, 0))?;
|
|
8204
8309
|
|
|
8205
8310
|
class.define_method("link_style", method!(ConversionOptions::link_style, 0))?;
|
|
@@ -8322,6 +8427,11 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
|
|
|
8322
8427
|
|
|
8323
8428
|
class.define_method("skip_images", method!(ConversionOptionsUpdate::skip_images, 0))?;
|
|
8324
8429
|
|
|
8430
|
+
class.define_method(
|
|
8431
|
+
"inline_data_media",
|
|
8432
|
+
method!(ConversionOptionsUpdate::inline_data_media, 0),
|
|
8433
|
+
)?;
|
|
8434
|
+
|
|
8325
8435
|
class.define_method(
|
|
8326
8436
|
"url_escape_style",
|
|
8327
8437
|
method!(ConversionOptionsUpdate::url_escape_style, 0),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:9cd1523beb892a6e5eef0c33a956855a8178865245dbf115fe62ed9e618d85ab
|
|
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.16.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:7c6e1f7268fd0bfae41495747b5df560e98fa6c7b17ab6e17963ab6c5f8e4e53
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -42,6 +42,7 @@ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Fl
|
|
|
42
42
|
attr_reader strip_tags: Array[String]
|
|
43
43
|
attr_reader preserve_tags: Array[String]
|
|
44
44
|
attr_reader skip_images: bool
|
|
45
|
+
attr_reader inline_data_media: enum_InlineDataMedia
|
|
45
46
|
attr_reader url_escape_style: enum_UrlEscapeStyle
|
|
46
47
|
attr_reader link_style: enum_LinkStyle
|
|
47
48
|
attr_reader output_format: enum_OutputFormat
|
|
@@ -56,7 +57,7 @@ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Fl
|
|
|
56
57
|
attr_reader base_url: String?
|
|
57
58
|
attr_reader visitor: VisitorHandle?
|
|
58
59
|
|
|
59
|
-
def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_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: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_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: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_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: enum_TierStrategy, ?base_url: String, ?visitor: VisitorHandle) -> void
|
|
60
|
+
def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_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: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?inline_data_media: enum_InlineDataMedia, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_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: enum_TierStrategy, ?base_url: String, ?visitor: VisitorHandle) -> void
|
|
60
61
|
end
|
|
61
62
|
|
|
62
63
|
class ConversionOptionsUpdate
|
|
@@ -92,6 +93,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
|
|
|
92
93
|
attr_reader strip_tags: Array[String]?
|
|
93
94
|
attr_reader preserve_tags: Array[String]?
|
|
94
95
|
attr_reader skip_images: bool?
|
|
96
|
+
attr_reader inline_data_media: enum_InlineDataMedia?
|
|
95
97
|
attr_reader url_escape_style: enum_UrlEscapeStyle?
|
|
96
98
|
attr_reader link_style: enum_LinkStyle?
|
|
97
99
|
attr_reader output_format: enum_OutputFormat?
|
|
@@ -106,7 +108,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
|
|
|
106
108
|
attr_reader base_url: String?
|
|
107
109
|
attr_reader visitor: VisitorHandle?
|
|
108
110
|
|
|
109
|
-
def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_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: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_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: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_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: enum_TierStrategy, ?base_url: String?, ?visitor: VisitorHandle) -> void
|
|
111
|
+
def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_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: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptionsUpdate, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?inline_data_media: enum_InlineDataMedia, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_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: enum_TierStrategy, ?base_url: String?, ?visitor: VisitorHandle) -> void
|
|
110
112
|
end
|
|
111
113
|
|
|
112
114
|
class ConversionResult
|
|
@@ -304,6 +306,8 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
|
|
|
304
306
|
|
|
305
307
|
type enum_ImageType = :data_uri | :inline_svg | :external | :relative
|
|
306
308
|
|
|
309
|
+
type enum_InlineDataMedia = :Keep | :AltTextOnly | :DropElement
|
|
310
|
+
|
|
307
311
|
type enum_LinkStyle = :Inline | :Reference
|
|
308
312
|
|
|
309
313
|
type enum_LinkType = :anchor | :internal | :external | :email | :phone | :other
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.16.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld <naaman@xberg.io>
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|