html-to-markdown 3.11.3 → 3.11.4
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 +5 -5
- data/ext/html_to_markdown_rb/native/Cargo.toml +3 -3
- data/ext/html_to_markdown_rb/native/extconf.rb +1 -1
- data/ext/html_to_markdown_rb/src/lib.rs +286 -269
- data/lib/html_to_markdown/native.rb +1 -1
- data/lib/html_to_markdown/version.rb +2 -2
- data/lib/html_to_markdown.rb +1 -1
- data/lib/html_to_markdown_rb.so +0 -0
- data/sig/types.rbs +14 -14
- 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: 725f95c084c2927a971291f61acc278f9527f003c1526b0ab8296a2976b61a4f
|
|
4
|
+
data.tar.gz: 9a1bfb2d18068023fc403d3ab98a215136928de7313c98addc36b07eac41cfa2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f345c49b07ae565e5fbdcbc9ef717ad2b925d8dde399b0cd2a2136abe1f276947d9714a14243aba87ca1ad2df4c30a4d097b30c124453ae7850b39d1df15bdb9
|
|
7
|
+
data.tar.gz: 1b5d3c8553eafe15c8f78feb575817ad6089b31ba6bd5b5e2cb821024f99bc2cb390a4c8ff07f0faf91935ee29740eca9bce2d03cf728cf4ef859a2dbd0c9c7d
|
|
@@ -220,7 +220,7 @@ checksum = "c9356095b4b41197bba32173600e1582792cda618f65d12f68e2e77d273413c5"
|
|
|
220
220
|
|
|
221
221
|
[[package]]
|
|
222
222
|
name = "html-to-markdown-rb"
|
|
223
|
-
version = "3.11.
|
|
223
|
+
version = "3.11.4"
|
|
224
224
|
dependencies = [
|
|
225
225
|
"html-to-markdown-rs",
|
|
226
226
|
"magnus",
|
|
@@ -230,7 +230,7 @@ dependencies = [
|
|
|
230
230
|
|
|
231
231
|
[[package]]
|
|
232
232
|
name = "html-to-markdown-rs"
|
|
233
|
-
version = "3.11.
|
|
233
|
+
version = "3.11.4"
|
|
234
234
|
dependencies = [
|
|
235
235
|
"ahash",
|
|
236
236
|
"astral-tl",
|
|
@@ -231,7 +231,7 @@ checksum = "c9356095b4b41197bba32173600e1582792cda618f65d12f68e2e77d273413c5"
|
|
|
231
231
|
|
|
232
232
|
[[package]]
|
|
233
233
|
name = "html-to-markdown-rb"
|
|
234
|
-
version = "3.11.
|
|
234
|
+
version = "3.11.4"
|
|
235
235
|
dependencies = [
|
|
236
236
|
"async-trait",
|
|
237
237
|
"html-to-markdown-rs",
|
|
@@ -245,9 +245,9 @@ dependencies = [
|
|
|
245
245
|
|
|
246
246
|
[[package]]
|
|
247
247
|
name = "html-to-markdown-rs"
|
|
248
|
-
version = "3.11.
|
|
248
|
+
version = "3.11.4"
|
|
249
249
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
250
|
-
checksum = "
|
|
250
|
+
checksum = "6331a4c21bc99309e5863092660c08505c426eb1158e0472013487ecff85412b"
|
|
251
251
|
dependencies = [
|
|
252
252
|
"ahash",
|
|
253
253
|
"astral-tl",
|
|
@@ -624,9 +624,9 @@ dependencies = [
|
|
|
624
624
|
|
|
625
625
|
[[package]]
|
|
626
626
|
name = "rb-sys-build"
|
|
627
|
-
version = "0.9.
|
|
627
|
+
version = "0.9.130"
|
|
628
628
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
629
|
-
checksum = "
|
|
629
|
+
checksum = "05be6f9c86fe5482808162826f6c047d093b3670582296c770de1d94f8066694"
|
|
630
630
|
dependencies = [
|
|
631
631
|
"bindgen",
|
|
632
632
|
"lazy_static",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:06c8275faa8db108254aad522dcfcb86aa7d3c7209c0aec1e0b2d31b7e3fead9
|
|
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.11.
|
|
8
|
+
version = "3.11.4"
|
|
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.11.
|
|
33
|
+
html-to-markdown-rs = { version = "3.11.4", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
|
|
34
34
|
magnus = "0.8"
|
|
35
35
|
rb-sys = ">=0.9, <0.9.128"
|
|
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:c13c87de19810ef6f27d80e6a007ea57b79b0566cea4e2e4e835b459d757e036
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:8567b1374b02f8c55dcc16b8f3ee9b74e21d22fe4a19cda88f345b87da27a730
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -2647,8 +2647,8 @@ impl Default for TextDirection {
|
|
|
2647
2647
|
impl magnus::IntoValue for TextDirection {
|
|
2648
2648
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
2649
2649
|
let sym = match self {
|
|
2650
|
-
TextDirection::LeftToRight => "
|
|
2651
|
-
TextDirection::RightToLeft => "
|
|
2650
|
+
TextDirection::LeftToRight => "ltr",
|
|
2651
|
+
TextDirection::RightToLeft => "rtl",
|
|
2652
2652
|
TextDirection::Auto => "auto",
|
|
2653
2653
|
};
|
|
2654
2654
|
handle.to_symbol(sym).into_value_with(handle)
|
|
@@ -2658,11 +2658,12 @@ impl magnus::IntoValue for TextDirection {
|
|
|
2658
2658
|
impl magnus::TryConvert for TextDirection {
|
|
2659
2659
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
2660
2660
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
2661
|
-
// Accept the serde wire
|
|
2662
|
-
//
|
|
2661
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
2662
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
2663
|
+
// existing consumer code written in any of those styles keep working.
|
|
2663
2664
|
match s.as_str() {
|
|
2664
|
-
"left_to_right" | "LeftToRight" => Ok(TextDirection::LeftToRight),
|
|
2665
|
-
"right_to_left" | "RightToLeft" => Ok(TextDirection::RightToLeft),
|
|
2665
|
+
"ltr" | "left_to_right" | "LeftToRight" => Ok(TextDirection::LeftToRight),
|
|
2666
|
+
"rtl" | "right_to_left" | "RightToLeft" => Ok(TextDirection::RightToLeft),
|
|
2666
2667
|
"auto" | "Auto" => Ok(TextDirection::Auto),
|
|
2667
2668
|
other => Err(magnus::Error::new(
|
|
2668
2669
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
@@ -2709,8 +2710,9 @@ impl magnus::IntoValue for LinkType {
|
|
|
2709
2710
|
impl magnus::TryConvert for LinkType {
|
|
2710
2711
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
2711
2712
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
2712
|
-
// Accept the serde wire
|
|
2713
|
-
//
|
|
2713
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
2714
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
2715
|
+
// existing consumer code written in any of those styles keep working.
|
|
2714
2716
|
match s.as_str() {
|
|
2715
2717
|
"anchor" | "Anchor" => Ok(LinkType::Anchor),
|
|
2716
2718
|
"internal" | "Internal" => Ok(LinkType::Internal),
|
|
@@ -2759,8 +2761,9 @@ impl magnus::IntoValue for ImageType {
|
|
|
2759
2761
|
impl magnus::TryConvert for ImageType {
|
|
2760
2762
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
2761
2763
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
2762
|
-
// Accept the serde wire
|
|
2763
|
-
//
|
|
2764
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
2765
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
2766
|
+
// existing consumer code written in any of those styles keep working.
|
|
2764
2767
|
match s.as_str() {
|
|
2765
2768
|
"data_uri" | "DataUri" => Ok(ImageType::DataUri),
|
|
2766
2769
|
"inline_svg" | "InlineSvg" => Ok(ImageType::InlineSvg),
|
|
@@ -2798,7 +2801,7 @@ impl magnus::IntoValue for StructuredDataType {
|
|
|
2798
2801
|
let sym = match self {
|
|
2799
2802
|
StructuredDataType::JsonLd => "json_ld",
|
|
2800
2803
|
StructuredDataType::Microdata => "microdata",
|
|
2801
|
-
StructuredDataType::RDFa => "
|
|
2804
|
+
StructuredDataType::RDFa => "rdfa",
|
|
2802
2805
|
};
|
|
2803
2806
|
handle.to_symbol(sym).into_value_with(handle)
|
|
2804
2807
|
}
|
|
@@ -2807,12 +2810,13 @@ impl magnus::IntoValue for StructuredDataType {
|
|
|
2807
2810
|
impl magnus::TryConvert for StructuredDataType {
|
|
2808
2811
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
2809
2812
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
2810
|
-
// Accept the serde wire
|
|
2811
|
-
//
|
|
2813
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
2814
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
2815
|
+
// existing consumer code written in any of those styles keep working.
|
|
2812
2816
|
match s.as_str() {
|
|
2813
2817
|
"json_ld" | "JsonLd" => Ok(StructuredDataType::JsonLd),
|
|
2814
2818
|
"microdata" | "Microdata" => Ok(StructuredDataType::Microdata),
|
|
2815
|
-
"rd_fa" | "RDFa" => Ok(StructuredDataType::RDFa),
|
|
2819
|
+
"rdfa" | "rd_fa" | "RDFa" => Ok(StructuredDataType::RDFa),
|
|
2816
2820
|
other => Err(magnus::Error::new(
|
|
2817
2821
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
2818
2822
|
format!("invalid StructuredDataType value: {other}"),
|
|
@@ -2852,8 +2856,9 @@ impl magnus::IntoValue for TierStrategy {
|
|
|
2852
2856
|
impl magnus::TryConvert for TierStrategy {
|
|
2853
2857
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
2854
2858
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
2855
|
-
// Accept the serde wire
|
|
2856
|
-
//
|
|
2859
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
2860
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
2861
|
+
// existing consumer code written in any of those styles keep working.
|
|
2857
2862
|
match s.as_str() {
|
|
2858
2863
|
"auto" | "Auto" => Ok(TierStrategy::Auto),
|
|
2859
2864
|
"tier2" | "Tier2" => Ok(TierStrategy::Tier2),
|
|
@@ -2885,9 +2890,9 @@ impl Default for PreprocessingPreset {
|
|
|
2885
2890
|
impl magnus::IntoValue for PreprocessingPreset {
|
|
2886
2891
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
2887
2892
|
let sym = match self {
|
|
2888
|
-
PreprocessingPreset::Minimal => "
|
|
2889
|
-
PreprocessingPreset::Standard => "
|
|
2890
|
-
PreprocessingPreset::Aggressive => "
|
|
2893
|
+
PreprocessingPreset::Minimal => "Minimal",
|
|
2894
|
+
PreprocessingPreset::Standard => "Standard",
|
|
2895
|
+
PreprocessingPreset::Aggressive => "Aggressive",
|
|
2891
2896
|
};
|
|
2892
2897
|
handle.to_symbol(sym).into_value_with(handle)
|
|
2893
2898
|
}
|
|
@@ -2896,12 +2901,13 @@ impl magnus::IntoValue for PreprocessingPreset {
|
|
|
2896
2901
|
impl magnus::TryConvert for PreprocessingPreset {
|
|
2897
2902
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
2898
2903
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
2899
|
-
// Accept the serde wire
|
|
2900
|
-
//
|
|
2904
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
2905
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
2906
|
+
// existing consumer code written in any of those styles keep working.
|
|
2901
2907
|
match s.as_str() {
|
|
2902
|
-
"
|
|
2903
|
-
"
|
|
2904
|
-
"
|
|
2908
|
+
"Minimal" | "minimal" => Ok(PreprocessingPreset::Minimal),
|
|
2909
|
+
"Standard" | "standard" => Ok(PreprocessingPreset::Standard),
|
|
2910
|
+
"Aggressive" | "aggressive" => Ok(PreprocessingPreset::Aggressive),
|
|
2905
2911
|
other => Err(magnus::Error::new(
|
|
2906
2912
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
2907
2913
|
format!("invalid PreprocessingPreset value: {other}"),
|
|
@@ -2929,9 +2935,9 @@ impl Default for HeadingStyle {
|
|
|
2929
2935
|
impl magnus::IntoValue for HeadingStyle {
|
|
2930
2936
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
2931
2937
|
let sym = match self {
|
|
2932
|
-
HeadingStyle::Underlined => "
|
|
2933
|
-
HeadingStyle::Atx => "
|
|
2934
|
-
HeadingStyle::AtxClosed => "
|
|
2938
|
+
HeadingStyle::Underlined => "Underlined",
|
|
2939
|
+
HeadingStyle::Atx => "Atx",
|
|
2940
|
+
HeadingStyle::AtxClosed => "AtxClosed",
|
|
2935
2941
|
};
|
|
2936
2942
|
handle.to_symbol(sym).into_value_with(handle)
|
|
2937
2943
|
}
|
|
@@ -2940,12 +2946,13 @@ impl magnus::IntoValue for HeadingStyle {
|
|
|
2940
2946
|
impl magnus::TryConvert for HeadingStyle {
|
|
2941
2947
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
2942
2948
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
2943
|
-
// Accept the serde wire
|
|
2944
|
-
//
|
|
2949
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
2950
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
2951
|
+
// existing consumer code written in any of those styles keep working.
|
|
2945
2952
|
match s.as_str() {
|
|
2946
|
-
"
|
|
2947
|
-
"
|
|
2948
|
-
"
|
|
2953
|
+
"Underlined" | "underlined" => Ok(HeadingStyle::Underlined),
|
|
2954
|
+
"Atx" | "atx" => Ok(HeadingStyle::Atx),
|
|
2955
|
+
"AtxClosed" | "atx_closed" => Ok(HeadingStyle::AtxClosed),
|
|
2949
2956
|
other => Err(magnus::Error::new(
|
|
2950
2957
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
2951
2958
|
format!("invalid HeadingStyle value: {other}"),
|
|
@@ -2972,8 +2979,8 @@ impl Default for ListIndentType {
|
|
|
2972
2979
|
impl magnus::IntoValue for ListIndentType {
|
|
2973
2980
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
2974
2981
|
let sym = match self {
|
|
2975
|
-
ListIndentType::Spaces => "
|
|
2976
|
-
ListIndentType::Tabs => "
|
|
2982
|
+
ListIndentType::Spaces => "Spaces",
|
|
2983
|
+
ListIndentType::Tabs => "Tabs",
|
|
2977
2984
|
};
|
|
2978
2985
|
handle.to_symbol(sym).into_value_with(handle)
|
|
2979
2986
|
}
|
|
@@ -2982,11 +2989,12 @@ impl magnus::IntoValue for ListIndentType {
|
|
|
2982
2989
|
impl magnus::TryConvert for ListIndentType {
|
|
2983
2990
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
2984
2991
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
2985
|
-
// Accept the serde wire
|
|
2986
|
-
//
|
|
2992
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
2993
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
2994
|
+
// existing consumer code written in any of those styles keep working.
|
|
2987
2995
|
match s.as_str() {
|
|
2988
|
-
"
|
|
2989
|
-
"
|
|
2996
|
+
"Spaces" | "spaces" => Ok(ListIndentType::Spaces),
|
|
2997
|
+
"Tabs" | "tabs" => Ok(ListIndentType::Tabs),
|
|
2990
2998
|
other => Err(magnus::Error::new(
|
|
2991
2999
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
2992
3000
|
format!("invalid ListIndentType value: {other}"),
|
|
@@ -3013,8 +3021,8 @@ impl Default for WhitespaceMode {
|
|
|
3013
3021
|
impl magnus::IntoValue for WhitespaceMode {
|
|
3014
3022
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
3015
3023
|
let sym = match self {
|
|
3016
|
-
WhitespaceMode::Normalized => "
|
|
3017
|
-
WhitespaceMode::Strict => "
|
|
3024
|
+
WhitespaceMode::Normalized => "Normalized",
|
|
3025
|
+
WhitespaceMode::Strict => "Strict",
|
|
3018
3026
|
};
|
|
3019
3027
|
handle.to_symbol(sym).into_value_with(handle)
|
|
3020
3028
|
}
|
|
@@ -3023,11 +3031,12 @@ impl magnus::IntoValue for WhitespaceMode {
|
|
|
3023
3031
|
impl magnus::TryConvert for WhitespaceMode {
|
|
3024
3032
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3025
3033
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
3026
|
-
// Accept the serde wire
|
|
3027
|
-
//
|
|
3034
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3035
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3036
|
+
// existing consumer code written in any of those styles keep working.
|
|
3028
3037
|
match s.as_str() {
|
|
3029
|
-
"
|
|
3030
|
-
"
|
|
3038
|
+
"Normalized" | "normalized" => Ok(WhitespaceMode::Normalized),
|
|
3039
|
+
"Strict" | "strict" => Ok(WhitespaceMode::Strict),
|
|
3031
3040
|
other => Err(magnus::Error::new(
|
|
3032
3041
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
3033
3042
|
format!("invalid WhitespaceMode value: {other}"),
|
|
@@ -3054,8 +3063,8 @@ impl Default for NewlineStyle {
|
|
|
3054
3063
|
impl magnus::IntoValue for NewlineStyle {
|
|
3055
3064
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
3056
3065
|
let sym = match self {
|
|
3057
|
-
NewlineStyle::Spaces => "
|
|
3058
|
-
NewlineStyle::Backslash => "
|
|
3066
|
+
NewlineStyle::Spaces => "Spaces",
|
|
3067
|
+
NewlineStyle::Backslash => "Backslash",
|
|
3059
3068
|
};
|
|
3060
3069
|
handle.to_symbol(sym).into_value_with(handle)
|
|
3061
3070
|
}
|
|
@@ -3064,11 +3073,12 @@ impl magnus::IntoValue for NewlineStyle {
|
|
|
3064
3073
|
impl magnus::TryConvert for NewlineStyle {
|
|
3065
3074
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3066
3075
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
3067
|
-
// Accept the serde wire
|
|
3068
|
-
//
|
|
3076
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3077
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3078
|
+
// existing consumer code written in any of those styles keep working.
|
|
3069
3079
|
match s.as_str() {
|
|
3070
|
-
"
|
|
3071
|
-
"
|
|
3080
|
+
"Spaces" | "spaces" => Ok(NewlineStyle::Spaces),
|
|
3081
|
+
"Backslash" | "backslash" => Ok(NewlineStyle::Backslash),
|
|
3072
3082
|
other => Err(magnus::Error::new(
|
|
3073
3083
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
3074
3084
|
format!("invalid NewlineStyle value: {other}"),
|
|
@@ -3096,9 +3106,9 @@ impl Default for CodeBlockStyle {
|
|
|
3096
3106
|
impl magnus::IntoValue for CodeBlockStyle {
|
|
3097
3107
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
3098
3108
|
let sym = match self {
|
|
3099
|
-
CodeBlockStyle::Indented => "
|
|
3100
|
-
CodeBlockStyle::Backticks => "
|
|
3101
|
-
CodeBlockStyle::Tildes => "
|
|
3109
|
+
CodeBlockStyle::Indented => "Indented",
|
|
3110
|
+
CodeBlockStyle::Backticks => "Backticks",
|
|
3111
|
+
CodeBlockStyle::Tildes => "Tildes",
|
|
3102
3112
|
};
|
|
3103
3113
|
handle.to_symbol(sym).into_value_with(handle)
|
|
3104
3114
|
}
|
|
@@ -3107,12 +3117,13 @@ impl magnus::IntoValue for CodeBlockStyle {
|
|
|
3107
3117
|
impl magnus::TryConvert for CodeBlockStyle {
|
|
3108
3118
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3109
3119
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
3110
|
-
// Accept the serde wire
|
|
3111
|
-
//
|
|
3120
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3121
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3122
|
+
// existing consumer code written in any of those styles keep working.
|
|
3112
3123
|
match s.as_str() {
|
|
3113
|
-
"
|
|
3114
|
-
"
|
|
3115
|
-
"
|
|
3124
|
+
"Indented" | "indented" => Ok(CodeBlockStyle::Indented),
|
|
3125
|
+
"Backticks" | "backticks" => Ok(CodeBlockStyle::Backticks),
|
|
3126
|
+
"Tildes" | "tildes" => Ok(CodeBlockStyle::Tildes),
|
|
3116
3127
|
other => Err(magnus::Error::new(
|
|
3117
3128
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
3118
3129
|
format!("invalid CodeBlockStyle value: {other}"),
|
|
@@ -3141,10 +3152,10 @@ impl Default for HighlightStyle {
|
|
|
3141
3152
|
impl magnus::IntoValue for HighlightStyle {
|
|
3142
3153
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
3143
3154
|
let sym = match self {
|
|
3144
|
-
HighlightStyle::DoubleEqual => "
|
|
3145
|
-
HighlightStyle::Html => "
|
|
3146
|
-
HighlightStyle::Bold => "
|
|
3147
|
-
HighlightStyle::None => "
|
|
3155
|
+
HighlightStyle::DoubleEqual => "DoubleEqual",
|
|
3156
|
+
HighlightStyle::Html => "Html",
|
|
3157
|
+
HighlightStyle::Bold => "Bold",
|
|
3158
|
+
HighlightStyle::None => "None",
|
|
3148
3159
|
};
|
|
3149
3160
|
handle.to_symbol(sym).into_value_with(handle)
|
|
3150
3161
|
}
|
|
@@ -3153,13 +3164,14 @@ impl magnus::IntoValue for HighlightStyle {
|
|
|
3153
3164
|
impl magnus::TryConvert for HighlightStyle {
|
|
3154
3165
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3155
3166
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
3156
|
-
// Accept the serde wire
|
|
3157
|
-
//
|
|
3167
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3168
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3169
|
+
// existing consumer code written in any of those styles keep working.
|
|
3158
3170
|
match s.as_str() {
|
|
3159
|
-
"
|
|
3160
|
-
"
|
|
3161
|
-
"
|
|
3162
|
-
"
|
|
3171
|
+
"DoubleEqual" | "double_equal" => Ok(HighlightStyle::DoubleEqual),
|
|
3172
|
+
"Html" | "html" => Ok(HighlightStyle::Html),
|
|
3173
|
+
"Bold" | "bold" => Ok(HighlightStyle::Bold),
|
|
3174
|
+
"None" | "none" => Ok(HighlightStyle::None),
|
|
3163
3175
|
other => Err(magnus::Error::new(
|
|
3164
3176
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
3165
3177
|
format!("invalid HighlightStyle value: {other}"),
|
|
@@ -3186,8 +3198,8 @@ impl Default for LinkStyle {
|
|
|
3186
3198
|
impl magnus::IntoValue for LinkStyle {
|
|
3187
3199
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
3188
3200
|
let sym = match self {
|
|
3189
|
-
LinkStyle::Inline => "
|
|
3190
|
-
LinkStyle::Reference => "
|
|
3201
|
+
LinkStyle::Inline => "Inline",
|
|
3202
|
+
LinkStyle::Reference => "Reference",
|
|
3191
3203
|
};
|
|
3192
3204
|
handle.to_symbol(sym).into_value_with(handle)
|
|
3193
3205
|
}
|
|
@@ -3196,11 +3208,12 @@ impl magnus::IntoValue for LinkStyle {
|
|
|
3196
3208
|
impl magnus::TryConvert for LinkStyle {
|
|
3197
3209
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3198
3210
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
3199
|
-
// Accept the serde wire
|
|
3200
|
-
//
|
|
3211
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3212
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3213
|
+
// existing consumer code written in any of those styles keep working.
|
|
3201
3214
|
match s.as_str() {
|
|
3202
|
-
"
|
|
3203
|
-
"
|
|
3215
|
+
"Inline" | "inline" => Ok(LinkStyle::Inline),
|
|
3216
|
+
"Reference" | "reference" => Ok(LinkStyle::Reference),
|
|
3204
3217
|
other => Err(magnus::Error::new(
|
|
3205
3218
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
3206
3219
|
format!("invalid LinkStyle value: {other}"),
|
|
@@ -3227,8 +3240,8 @@ impl Default for UrlEscapeStyle {
|
|
|
3227
3240
|
impl magnus::IntoValue for UrlEscapeStyle {
|
|
3228
3241
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
3229
3242
|
let sym = match self {
|
|
3230
|
-
UrlEscapeStyle::Angle => "
|
|
3231
|
-
UrlEscapeStyle::Percent => "
|
|
3243
|
+
UrlEscapeStyle::Angle => "Angle",
|
|
3244
|
+
UrlEscapeStyle::Percent => "Percent",
|
|
3232
3245
|
};
|
|
3233
3246
|
handle.to_symbol(sym).into_value_with(handle)
|
|
3234
3247
|
}
|
|
@@ -3237,11 +3250,12 @@ impl magnus::IntoValue for UrlEscapeStyle {
|
|
|
3237
3250
|
impl magnus::TryConvert for UrlEscapeStyle {
|
|
3238
3251
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3239
3252
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
3240
|
-
// Accept the serde wire
|
|
3241
|
-
//
|
|
3253
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3254
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3255
|
+
// existing consumer code written in any of those styles keep working.
|
|
3242
3256
|
match s.as_str() {
|
|
3243
|
-
"
|
|
3244
|
-
"
|
|
3257
|
+
"Angle" | "angle" => Ok(UrlEscapeStyle::Angle),
|
|
3258
|
+
"Percent" | "percent" => Ok(UrlEscapeStyle::Percent),
|
|
3245
3259
|
other => Err(magnus::Error::new(
|
|
3246
3260
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
3247
3261
|
format!("invalid UrlEscapeStyle value: {other}"),
|
|
@@ -3269,9 +3283,9 @@ impl Default for OutputFormat {
|
|
|
3269
3283
|
impl magnus::IntoValue for OutputFormat {
|
|
3270
3284
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
3271
3285
|
let sym = match self {
|
|
3272
|
-
OutputFormat::Markdown => "
|
|
3273
|
-
OutputFormat::Djot => "
|
|
3274
|
-
OutputFormat::Plain => "
|
|
3286
|
+
OutputFormat::Markdown => "Markdown",
|
|
3287
|
+
OutputFormat::Djot => "Djot",
|
|
3288
|
+
OutputFormat::Plain => "Plain",
|
|
3275
3289
|
};
|
|
3276
3290
|
handle.to_symbol(sym).into_value_with(handle)
|
|
3277
3291
|
}
|
|
@@ -3280,12 +3294,13 @@ impl magnus::IntoValue for OutputFormat {
|
|
|
3280
3294
|
impl magnus::TryConvert for OutputFormat {
|
|
3281
3295
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3282
3296
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
3283
|
-
// Accept the serde wire
|
|
3284
|
-
//
|
|
3297
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3298
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3299
|
+
// existing consumer code written in any of those styles keep working.
|
|
3285
3300
|
match s.as_str() {
|
|
3286
|
-
"
|
|
3287
|
-
"
|
|
3288
|
-
"
|
|
3301
|
+
"Markdown" | "markdown" => Ok(OutputFormat::Markdown),
|
|
3302
|
+
"Djot" | "djot" => Ok(OutputFormat::Djot),
|
|
3303
|
+
"Plain" | "plain" => Ok(OutputFormat::Plain),
|
|
3289
3304
|
other => Err(magnus::Error::new(
|
|
3290
3305
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
3291
3306
|
format!("invalid OutputFormat value: {other}"),
|
|
@@ -3500,8 +3515,9 @@ impl magnus::IntoValue for WarningKind {
|
|
|
3500
3515
|
impl magnus::TryConvert for WarningKind {
|
|
3501
3516
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3502
3517
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
3503
|
-
// Accept the serde wire
|
|
3504
|
-
//
|
|
3518
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3519
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3520
|
+
// existing consumer code written in any of those styles keep working.
|
|
3505
3521
|
match s.as_str() {
|
|
3506
3522
|
"image_extraction_failed" | "ImageExtractionFailed" => Ok(WarningKind::ImageExtractionFailed),
|
|
3507
3523
|
"encoding_fallback" | "EncodingFallback" => Ok(WarningKind::EncodingFallback),
|
|
@@ -3621,94 +3637,94 @@ impl Default for NodeType {
|
|
|
3621
3637
|
impl magnus::IntoValue for NodeType {
|
|
3622
3638
|
fn into_value_with(self, handle: &Ruby) -> magnus::Value {
|
|
3623
3639
|
let sym = match self {
|
|
3624
|
-
NodeType::Text => "
|
|
3625
|
-
NodeType::Element => "
|
|
3626
|
-
NodeType::Heading => "
|
|
3627
|
-
NodeType::Paragraph => "
|
|
3628
|
-
NodeType::Div => "
|
|
3629
|
-
NodeType::Blockquote => "
|
|
3630
|
-
NodeType::Pre => "
|
|
3631
|
-
NodeType::Hr => "
|
|
3632
|
-
NodeType::List => "
|
|
3633
|
-
NodeType::ListItem => "
|
|
3634
|
-
NodeType::DefinitionList => "
|
|
3635
|
-
NodeType::DefinitionTerm => "
|
|
3636
|
-
NodeType::DefinitionDescription => "
|
|
3637
|
-
NodeType::Table => "
|
|
3638
|
-
NodeType::TableRow => "
|
|
3639
|
-
NodeType::TableCell => "
|
|
3640
|
-
NodeType::TableHeader => "
|
|
3641
|
-
NodeType::TableBody => "
|
|
3642
|
-
NodeType::TableHead => "
|
|
3643
|
-
NodeType::TableFoot => "
|
|
3644
|
-
NodeType::Link => "
|
|
3645
|
-
NodeType::Image => "
|
|
3646
|
-
NodeType::Strong => "
|
|
3647
|
-
NodeType::Em => "
|
|
3648
|
-
NodeType::Code => "
|
|
3649
|
-
NodeType::Strikethrough => "
|
|
3650
|
-
NodeType::Underline => "
|
|
3651
|
-
NodeType::Subscript => "
|
|
3652
|
-
NodeType::Superscript => "
|
|
3653
|
-
NodeType::Mark => "
|
|
3654
|
-
NodeType::Small => "
|
|
3655
|
-
NodeType::Br => "
|
|
3656
|
-
NodeType::Span => "
|
|
3657
|
-
NodeType::Article => "
|
|
3658
|
-
NodeType::Section => "
|
|
3659
|
-
NodeType::Nav => "
|
|
3660
|
-
NodeType::Aside => "
|
|
3661
|
-
NodeType::Header => "
|
|
3662
|
-
NodeType::Footer => "
|
|
3663
|
-
NodeType::Main => "
|
|
3664
|
-
NodeType::Figure => "
|
|
3665
|
-
NodeType::Figcaption => "
|
|
3666
|
-
NodeType::Time => "
|
|
3667
|
-
NodeType::Details => "
|
|
3668
|
-
NodeType::Summary => "
|
|
3669
|
-
NodeType::Form => "
|
|
3670
|
-
NodeType::Input => "
|
|
3671
|
-
NodeType::Select => "
|
|
3672
|
-
NodeType::Option => "
|
|
3673
|
-
NodeType::Button => "
|
|
3674
|
-
NodeType::Textarea => "
|
|
3675
|
-
NodeType::Label => "
|
|
3676
|
-
NodeType::Fieldset => "
|
|
3677
|
-
NodeType::Legend => "
|
|
3678
|
-
NodeType::Audio => "
|
|
3679
|
-
NodeType::Video => "
|
|
3680
|
-
NodeType::Picture => "
|
|
3681
|
-
NodeType::Source => "
|
|
3682
|
-
NodeType::Iframe => "
|
|
3683
|
-
NodeType::Svg => "
|
|
3684
|
-
NodeType::Canvas => "
|
|
3685
|
-
NodeType::Ruby => "
|
|
3686
|
-
NodeType::Rt => "
|
|
3687
|
-
NodeType::Rp => "
|
|
3688
|
-
NodeType::Abbr => "
|
|
3689
|
-
NodeType::Kbd => "
|
|
3690
|
-
NodeType::Samp => "
|
|
3691
|
-
NodeType::Var => "
|
|
3692
|
-
NodeType::Cite => "
|
|
3693
|
-
NodeType::Q => "
|
|
3694
|
-
NodeType::Del => "
|
|
3695
|
-
NodeType::Ins => "
|
|
3696
|
-
NodeType::Data => "
|
|
3697
|
-
NodeType::Meter => "
|
|
3698
|
-
NodeType::Progress => "
|
|
3699
|
-
NodeType::Output => "
|
|
3700
|
-
NodeType::Template => "
|
|
3701
|
-
NodeType::Slot => "
|
|
3702
|
-
NodeType::Html => "
|
|
3703
|
-
NodeType::Head => "
|
|
3704
|
-
NodeType::Body => "
|
|
3705
|
-
NodeType::Title => "
|
|
3706
|
-
NodeType::Meta => "
|
|
3707
|
-
NodeType::LinkTag => "
|
|
3708
|
-
NodeType::Style => "
|
|
3709
|
-
NodeType::Script => "
|
|
3710
|
-
NodeType::Base => "
|
|
3711
|
-
NodeType::Custom => "
|
|
3640
|
+
NodeType::Text => "Text",
|
|
3641
|
+
NodeType::Element => "Element",
|
|
3642
|
+
NodeType::Heading => "Heading",
|
|
3643
|
+
NodeType::Paragraph => "Paragraph",
|
|
3644
|
+
NodeType::Div => "Div",
|
|
3645
|
+
NodeType::Blockquote => "Blockquote",
|
|
3646
|
+
NodeType::Pre => "Pre",
|
|
3647
|
+
NodeType::Hr => "Hr",
|
|
3648
|
+
NodeType::List => "List",
|
|
3649
|
+
NodeType::ListItem => "ListItem",
|
|
3650
|
+
NodeType::DefinitionList => "DefinitionList",
|
|
3651
|
+
NodeType::DefinitionTerm => "DefinitionTerm",
|
|
3652
|
+
NodeType::DefinitionDescription => "DefinitionDescription",
|
|
3653
|
+
NodeType::Table => "Table",
|
|
3654
|
+
NodeType::TableRow => "TableRow",
|
|
3655
|
+
NodeType::TableCell => "TableCell",
|
|
3656
|
+
NodeType::TableHeader => "TableHeader",
|
|
3657
|
+
NodeType::TableBody => "TableBody",
|
|
3658
|
+
NodeType::TableHead => "TableHead",
|
|
3659
|
+
NodeType::TableFoot => "TableFoot",
|
|
3660
|
+
NodeType::Link => "Link",
|
|
3661
|
+
NodeType::Image => "Image",
|
|
3662
|
+
NodeType::Strong => "Strong",
|
|
3663
|
+
NodeType::Em => "Em",
|
|
3664
|
+
NodeType::Code => "Code",
|
|
3665
|
+
NodeType::Strikethrough => "Strikethrough",
|
|
3666
|
+
NodeType::Underline => "Underline",
|
|
3667
|
+
NodeType::Subscript => "Subscript",
|
|
3668
|
+
NodeType::Superscript => "Superscript",
|
|
3669
|
+
NodeType::Mark => "Mark",
|
|
3670
|
+
NodeType::Small => "Small",
|
|
3671
|
+
NodeType::Br => "Br",
|
|
3672
|
+
NodeType::Span => "Span",
|
|
3673
|
+
NodeType::Article => "Article",
|
|
3674
|
+
NodeType::Section => "Section",
|
|
3675
|
+
NodeType::Nav => "Nav",
|
|
3676
|
+
NodeType::Aside => "Aside",
|
|
3677
|
+
NodeType::Header => "Header",
|
|
3678
|
+
NodeType::Footer => "Footer",
|
|
3679
|
+
NodeType::Main => "Main",
|
|
3680
|
+
NodeType::Figure => "Figure",
|
|
3681
|
+
NodeType::Figcaption => "Figcaption",
|
|
3682
|
+
NodeType::Time => "Time",
|
|
3683
|
+
NodeType::Details => "Details",
|
|
3684
|
+
NodeType::Summary => "Summary",
|
|
3685
|
+
NodeType::Form => "Form",
|
|
3686
|
+
NodeType::Input => "Input",
|
|
3687
|
+
NodeType::Select => "Select",
|
|
3688
|
+
NodeType::Option => "Option",
|
|
3689
|
+
NodeType::Button => "Button",
|
|
3690
|
+
NodeType::Textarea => "Textarea",
|
|
3691
|
+
NodeType::Label => "Label",
|
|
3692
|
+
NodeType::Fieldset => "Fieldset",
|
|
3693
|
+
NodeType::Legend => "Legend",
|
|
3694
|
+
NodeType::Audio => "Audio",
|
|
3695
|
+
NodeType::Video => "Video",
|
|
3696
|
+
NodeType::Picture => "Picture",
|
|
3697
|
+
NodeType::Source => "Source",
|
|
3698
|
+
NodeType::Iframe => "Iframe",
|
|
3699
|
+
NodeType::Svg => "Svg",
|
|
3700
|
+
NodeType::Canvas => "Canvas",
|
|
3701
|
+
NodeType::Ruby => "Ruby",
|
|
3702
|
+
NodeType::Rt => "Rt",
|
|
3703
|
+
NodeType::Rp => "Rp",
|
|
3704
|
+
NodeType::Abbr => "Abbr",
|
|
3705
|
+
NodeType::Kbd => "Kbd",
|
|
3706
|
+
NodeType::Samp => "Samp",
|
|
3707
|
+
NodeType::Var => "Var",
|
|
3708
|
+
NodeType::Cite => "Cite",
|
|
3709
|
+
NodeType::Q => "Q",
|
|
3710
|
+
NodeType::Del => "Del",
|
|
3711
|
+
NodeType::Ins => "Ins",
|
|
3712
|
+
NodeType::Data => "Data",
|
|
3713
|
+
NodeType::Meter => "Meter",
|
|
3714
|
+
NodeType::Progress => "Progress",
|
|
3715
|
+
NodeType::Output => "Output",
|
|
3716
|
+
NodeType::Template => "Template",
|
|
3717
|
+
NodeType::Slot => "Slot",
|
|
3718
|
+
NodeType::Html => "Html",
|
|
3719
|
+
NodeType::Head => "Head",
|
|
3720
|
+
NodeType::Body => "Body",
|
|
3721
|
+
NodeType::Title => "Title",
|
|
3722
|
+
NodeType::Meta => "Meta",
|
|
3723
|
+
NodeType::LinkTag => "LinkTag",
|
|
3724
|
+
NodeType::Style => "Style",
|
|
3725
|
+
NodeType::Script => "Script",
|
|
3726
|
+
NodeType::Base => "Base",
|
|
3727
|
+
NodeType::Custom => "Custom",
|
|
3712
3728
|
};
|
|
3713
3729
|
handle.to_symbol(sym).into_value_with(handle)
|
|
3714
3730
|
}
|
|
@@ -3717,97 +3733,98 @@ impl magnus::IntoValue for NodeType {
|
|
|
3717
3733
|
impl magnus::TryConvert for NodeType {
|
|
3718
3734
|
fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
|
|
3719
3735
|
let s: String = magnus::TryConvert::try_convert(val)?;
|
|
3720
|
-
// Accept the serde wire
|
|
3721
|
-
//
|
|
3736
|
+
// Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
|
|
3737
|
+
// emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
|
|
3738
|
+
// existing consumer code written in any of those styles keep working.
|
|
3722
3739
|
match s.as_str() {
|
|
3723
|
-
"
|
|
3724
|
-
"
|
|
3725
|
-
"
|
|
3726
|
-
"
|
|
3727
|
-
"
|
|
3728
|
-
"
|
|
3729
|
-
"
|
|
3730
|
-
"
|
|
3731
|
-
"
|
|
3732
|
-
"
|
|
3733
|
-
"
|
|
3734
|
-
"
|
|
3735
|
-
"
|
|
3736
|
-
"
|
|
3737
|
-
"
|
|
3738
|
-
"
|
|
3739
|
-
"
|
|
3740
|
-
"
|
|
3741
|
-
"
|
|
3742
|
-
"
|
|
3743
|
-
"
|
|
3744
|
-
"
|
|
3745
|
-
"
|
|
3746
|
-
"
|
|
3747
|
-
"
|
|
3748
|
-
"
|
|
3749
|
-
"
|
|
3750
|
-
"
|
|
3751
|
-
"
|
|
3752
|
-
"
|
|
3753
|
-
"
|
|
3754
|
-
"
|
|
3755
|
-
"
|
|
3756
|
-
"
|
|
3757
|
-
"
|
|
3758
|
-
"
|
|
3759
|
-
"
|
|
3760
|
-
"
|
|
3761
|
-
"
|
|
3762
|
-
"
|
|
3763
|
-
"
|
|
3764
|
-
"
|
|
3765
|
-
"
|
|
3766
|
-
"
|
|
3767
|
-
"
|
|
3768
|
-
"
|
|
3769
|
-
"
|
|
3770
|
-
"
|
|
3771
|
-
"
|
|
3772
|
-
"
|
|
3773
|
-
"
|
|
3774
|
-
"
|
|
3775
|
-
"
|
|
3776
|
-
"
|
|
3777
|
-
"
|
|
3778
|
-
"
|
|
3779
|
-
"
|
|
3780
|
-
"
|
|
3781
|
-
"
|
|
3782
|
-
"
|
|
3783
|
-
"
|
|
3784
|
-
"
|
|
3785
|
-
"
|
|
3786
|
-
"
|
|
3787
|
-
"
|
|
3788
|
-
"
|
|
3789
|
-
"
|
|
3790
|
-
"
|
|
3791
|
-
"
|
|
3792
|
-
"
|
|
3793
|
-
"
|
|
3794
|
-
"
|
|
3795
|
-
"
|
|
3796
|
-
"
|
|
3797
|
-
"
|
|
3798
|
-
"
|
|
3799
|
-
"
|
|
3800
|
-
"
|
|
3801
|
-
"
|
|
3802
|
-
"
|
|
3803
|
-
"
|
|
3804
|
-
"
|
|
3805
|
-
"
|
|
3806
|
-
"
|
|
3807
|
-
"
|
|
3808
|
-
"
|
|
3809
|
-
"
|
|
3810
|
-
"
|
|
3740
|
+
"Text" | "text" => Ok(NodeType::Text),
|
|
3741
|
+
"Element" | "element" => Ok(NodeType::Element),
|
|
3742
|
+
"Heading" | "heading" => Ok(NodeType::Heading),
|
|
3743
|
+
"Paragraph" | "paragraph" => Ok(NodeType::Paragraph),
|
|
3744
|
+
"Div" | "div" => Ok(NodeType::Div),
|
|
3745
|
+
"Blockquote" | "blockquote" => Ok(NodeType::Blockquote),
|
|
3746
|
+
"Pre" | "pre" => Ok(NodeType::Pre),
|
|
3747
|
+
"Hr" | "hr" => Ok(NodeType::Hr),
|
|
3748
|
+
"List" | "list" => Ok(NodeType::List),
|
|
3749
|
+
"ListItem" | "list_item" => Ok(NodeType::ListItem),
|
|
3750
|
+
"DefinitionList" | "definition_list" => Ok(NodeType::DefinitionList),
|
|
3751
|
+
"DefinitionTerm" | "definition_term" => Ok(NodeType::DefinitionTerm),
|
|
3752
|
+
"DefinitionDescription" | "definition_description" => Ok(NodeType::DefinitionDescription),
|
|
3753
|
+
"Table" | "table" => Ok(NodeType::Table),
|
|
3754
|
+
"TableRow" | "table_row" => Ok(NodeType::TableRow),
|
|
3755
|
+
"TableCell" | "table_cell" => Ok(NodeType::TableCell),
|
|
3756
|
+
"TableHeader" | "table_header" => Ok(NodeType::TableHeader),
|
|
3757
|
+
"TableBody" | "table_body" => Ok(NodeType::TableBody),
|
|
3758
|
+
"TableHead" | "table_head" => Ok(NodeType::TableHead),
|
|
3759
|
+
"TableFoot" | "table_foot" => Ok(NodeType::TableFoot),
|
|
3760
|
+
"Link" | "link" => Ok(NodeType::Link),
|
|
3761
|
+
"Image" | "image" => Ok(NodeType::Image),
|
|
3762
|
+
"Strong" | "strong" => Ok(NodeType::Strong),
|
|
3763
|
+
"Em" | "em" => Ok(NodeType::Em),
|
|
3764
|
+
"Code" | "code" => Ok(NodeType::Code),
|
|
3765
|
+
"Strikethrough" | "strikethrough" => Ok(NodeType::Strikethrough),
|
|
3766
|
+
"Underline" | "underline" => Ok(NodeType::Underline),
|
|
3767
|
+
"Subscript" | "subscript" => Ok(NodeType::Subscript),
|
|
3768
|
+
"Superscript" | "superscript" => Ok(NodeType::Superscript),
|
|
3769
|
+
"Mark" | "mark" => Ok(NodeType::Mark),
|
|
3770
|
+
"Small" | "small" => Ok(NodeType::Small),
|
|
3771
|
+
"Br" | "br" => Ok(NodeType::Br),
|
|
3772
|
+
"Span" | "span" => Ok(NodeType::Span),
|
|
3773
|
+
"Article" | "article" => Ok(NodeType::Article),
|
|
3774
|
+
"Section" | "section" => Ok(NodeType::Section),
|
|
3775
|
+
"Nav" | "nav" => Ok(NodeType::Nav),
|
|
3776
|
+
"Aside" | "aside" => Ok(NodeType::Aside),
|
|
3777
|
+
"Header" | "header" => Ok(NodeType::Header),
|
|
3778
|
+
"Footer" | "footer" => Ok(NodeType::Footer),
|
|
3779
|
+
"Main" | "main" => Ok(NodeType::Main),
|
|
3780
|
+
"Figure" | "figure" => Ok(NodeType::Figure),
|
|
3781
|
+
"Figcaption" | "figcaption" => Ok(NodeType::Figcaption),
|
|
3782
|
+
"Time" | "time" => Ok(NodeType::Time),
|
|
3783
|
+
"Details" | "details" => Ok(NodeType::Details),
|
|
3784
|
+
"Summary" | "summary" => Ok(NodeType::Summary),
|
|
3785
|
+
"Form" | "form" => Ok(NodeType::Form),
|
|
3786
|
+
"Input" | "input" => Ok(NodeType::Input),
|
|
3787
|
+
"Select" | "select" => Ok(NodeType::Select),
|
|
3788
|
+
"Option" | "option" => Ok(NodeType::Option),
|
|
3789
|
+
"Button" | "button" => Ok(NodeType::Button),
|
|
3790
|
+
"Textarea" | "textarea" => Ok(NodeType::Textarea),
|
|
3791
|
+
"Label" | "label" => Ok(NodeType::Label),
|
|
3792
|
+
"Fieldset" | "fieldset" => Ok(NodeType::Fieldset),
|
|
3793
|
+
"Legend" | "legend" => Ok(NodeType::Legend),
|
|
3794
|
+
"Audio" | "audio" => Ok(NodeType::Audio),
|
|
3795
|
+
"Video" | "video" => Ok(NodeType::Video),
|
|
3796
|
+
"Picture" | "picture" => Ok(NodeType::Picture),
|
|
3797
|
+
"Source" | "source" => Ok(NodeType::Source),
|
|
3798
|
+
"Iframe" | "iframe" => Ok(NodeType::Iframe),
|
|
3799
|
+
"Svg" | "svg" => Ok(NodeType::Svg),
|
|
3800
|
+
"Canvas" | "canvas" => Ok(NodeType::Canvas),
|
|
3801
|
+
"Ruby" | "ruby" => Ok(NodeType::Ruby),
|
|
3802
|
+
"Rt" | "rt" => Ok(NodeType::Rt),
|
|
3803
|
+
"Rp" | "rp" => Ok(NodeType::Rp),
|
|
3804
|
+
"Abbr" | "abbr" => Ok(NodeType::Abbr),
|
|
3805
|
+
"Kbd" | "kbd" => Ok(NodeType::Kbd),
|
|
3806
|
+
"Samp" | "samp" => Ok(NodeType::Samp),
|
|
3807
|
+
"Var" | "var" => Ok(NodeType::Var),
|
|
3808
|
+
"Cite" | "cite" => Ok(NodeType::Cite),
|
|
3809
|
+
"Q" | "q" => Ok(NodeType::Q),
|
|
3810
|
+
"Del" | "del" => Ok(NodeType::Del),
|
|
3811
|
+
"Ins" | "ins" => Ok(NodeType::Ins),
|
|
3812
|
+
"Data" | "data" => Ok(NodeType::Data),
|
|
3813
|
+
"Meter" | "meter" => Ok(NodeType::Meter),
|
|
3814
|
+
"Progress" | "progress" => Ok(NodeType::Progress),
|
|
3815
|
+
"Output" | "output" => Ok(NodeType::Output),
|
|
3816
|
+
"Template" | "template" => Ok(NodeType::Template),
|
|
3817
|
+
"Slot" | "slot" => Ok(NodeType::Slot),
|
|
3818
|
+
"Html" | "html" => Ok(NodeType::Html),
|
|
3819
|
+
"Head" | "head" => Ok(NodeType::Head),
|
|
3820
|
+
"Body" | "body" => Ok(NodeType::Body),
|
|
3821
|
+
"Title" | "title" => Ok(NodeType::Title),
|
|
3822
|
+
"Meta" | "meta" => Ok(NodeType::Meta),
|
|
3823
|
+
"LinkTag" | "link_tag" => Ok(NodeType::LinkTag),
|
|
3824
|
+
"Style" | "style" => Ok(NodeType::Style),
|
|
3825
|
+
"Script" | "script" => Ok(NodeType::Script),
|
|
3826
|
+
"Base" | "base" => Ok(NodeType::Base),
|
|
3827
|
+
"Custom" | "custom" => Ok(NodeType::Custom),
|
|
3811
3828
|
other => Err(magnus::Error::new(
|
|
3812
3829
|
unsafe { Ruby::get_unchecked() }.exception_arg_error(),
|
|
3813
3830
|
format!("invalid NodeType value: {other}"),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:d679b59088594adaffae8541ddda37761d2ea48733185dc6d5b1a45f82cf2d54
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:c9d820a0f5c8db11ca96985c39dce0e8a31ed8a0ab0ad0e738734a2555dc3a6f
|
|
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.11.
|
|
9
|
+
VERSION = "3.11.4"
|
|
10
10
|
end
|
data/lib/html_to_markdown.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:8416d126100cec6c753e064aad4c3585c5aa55cd3666f930627f52717f8b3cd2
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
# frozen_string_literal: true
|
data/lib/html_to_markdown_rb.so
CHANGED
|
Binary file
|
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:f3a3421ae776c3ce9950a5a7b9e56d5732b7a5d34f283c57b21dac9e54e47606
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify
|
|
5
5
|
|
|
@@ -292,7 +292,7 @@ module HtmlToMarkdown
|
|
|
292
292
|
end
|
|
293
293
|
|
|
294
294
|
class TextDirection
|
|
295
|
-
type value = :
|
|
295
|
+
type value = :ltr | :rtl | :auto
|
|
296
296
|
end
|
|
297
297
|
|
|
298
298
|
class LinkType
|
|
@@ -304,7 +304,7 @@ module HtmlToMarkdown
|
|
|
304
304
|
end
|
|
305
305
|
|
|
306
306
|
class StructuredDataType
|
|
307
|
-
type value = :json_ld | :microdata | :
|
|
307
|
+
type value = :json_ld | :microdata | :rdfa
|
|
308
308
|
end
|
|
309
309
|
|
|
310
310
|
class TierStrategy
|
|
@@ -312,43 +312,43 @@ module HtmlToMarkdown
|
|
|
312
312
|
end
|
|
313
313
|
|
|
314
314
|
class PreprocessingPreset
|
|
315
|
-
type value = :
|
|
315
|
+
type value = :Minimal | :Standard | :Aggressive
|
|
316
316
|
end
|
|
317
317
|
|
|
318
318
|
class HeadingStyle
|
|
319
|
-
type value = :
|
|
319
|
+
type value = :Underlined | :Atx | :AtxClosed
|
|
320
320
|
end
|
|
321
321
|
|
|
322
322
|
class ListIndentType
|
|
323
|
-
type value = :
|
|
323
|
+
type value = :Spaces | :Tabs
|
|
324
324
|
end
|
|
325
325
|
|
|
326
326
|
class WhitespaceMode
|
|
327
|
-
type value = :
|
|
327
|
+
type value = :Normalized | :Strict
|
|
328
328
|
end
|
|
329
329
|
|
|
330
330
|
class NewlineStyle
|
|
331
|
-
type value = :
|
|
331
|
+
type value = :Spaces | :Backslash
|
|
332
332
|
end
|
|
333
333
|
|
|
334
334
|
class CodeBlockStyle
|
|
335
|
-
type value = :
|
|
335
|
+
type value = :Indented | :Backticks | :Tildes
|
|
336
336
|
end
|
|
337
337
|
|
|
338
338
|
class HighlightStyle
|
|
339
|
-
type value = :
|
|
339
|
+
type value = :DoubleEqual | :Html | :Bold | :None
|
|
340
340
|
end
|
|
341
341
|
|
|
342
342
|
class LinkStyle
|
|
343
|
-
type value = :
|
|
343
|
+
type value = :Inline | :Reference
|
|
344
344
|
end
|
|
345
345
|
|
|
346
346
|
class UrlEscapeStyle
|
|
347
|
-
type value = :
|
|
347
|
+
type value = :Angle | :Percent
|
|
348
348
|
end
|
|
349
349
|
|
|
350
350
|
class OutputFormat
|
|
351
|
-
type value = :
|
|
351
|
+
type value = :Markdown | :Djot | :Plain
|
|
352
352
|
end
|
|
353
353
|
|
|
354
354
|
class NodeContent
|
|
@@ -362,7 +362,7 @@ module HtmlToMarkdown
|
|
|
362
362
|
end
|
|
363
363
|
|
|
364
364
|
class NodeType
|
|
365
|
-
type value = :
|
|
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
366
|
end
|
|
367
367
|
|
|
368
368
|
class VisitResult
|
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.11.
|
|
4
|
+
version: 3.11.4
|
|
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-08-
|
|
11
|
+
date: 2026-08-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|