html-to-markdown 3.12.2 → 3.12.3
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 +24 -7
- data/ext/html_to_markdown_rb/native/Cargo.toml +3 -3
- data/ext/html_to_markdown_rb/src/lib.rs +88 -71
- data/lib/html_to_markdown/version.rb +2 -2
- metadata +2 -4
- data/ext/html_to_markdown_rb/Cargo.lock +0 -954
- data/ext/html_to_markdown_rb/Cargo.toml +0 -50
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// This file is auto-generated by alef. DO NOT EDIT.
|
|
2
|
-
// alef:hash:
|
|
2
|
+
// alef:hash:2e1a0b812f48e71563c7dedb829a08a297779b31dab80f8518eeb6c6f0872c3b
|
|
3
3
|
// Re-generate with: alef generate
|
|
4
4
|
#![allow(dead_code, unused_imports, unused_variables)]
|
|
5
5
|
#![allow(
|
|
@@ -508,7 +508,7 @@ impl ConversionOptions {
|
|
|
508
508
|
})?,
|
|
509
509
|
None => true,
|
|
510
510
|
},
|
|
511
|
-
max_depth: match kwargs.get(ruby.to_symbol("max_depth")) {
|
|
511
|
+
max_depth: match kwargs.get(ruby.to_symbol("max_depth")).filter(|v| !v.is_nil()) {
|
|
512
512
|
Some(v) => Some(usize::try_convert(v).map_err(|e| {
|
|
513
513
|
magnus::Error::new(
|
|
514
514
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -801,7 +801,7 @@ impl ConversionOptionsUpdate {
|
|
|
801
801
|
let (kwargs_opt,) = args.optional;
|
|
802
802
|
let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
|
|
803
803
|
Ok(Self {
|
|
804
|
-
heading_style: match kwargs.get(ruby.to_symbol("heading_style")) {
|
|
804
|
+
heading_style: match kwargs.get(ruby.to_symbol("heading_style")).filter(|v| !v.is_nil()) {
|
|
805
805
|
Some(v) => Some(HeadingStyle::try_convert(v).map_err(|e| {
|
|
806
806
|
magnus::Error::new(
|
|
807
807
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -810,7 +810,7 @@ impl ConversionOptionsUpdate {
|
|
|
810
810
|
})?),
|
|
811
811
|
None => None,
|
|
812
812
|
},
|
|
813
|
-
list_indent_type: match kwargs.get(ruby.to_symbol("list_indent_type")) {
|
|
813
|
+
list_indent_type: match kwargs.get(ruby.to_symbol("list_indent_type")).filter(|v| !v.is_nil()) {
|
|
814
814
|
Some(v) => Some(ListIndentType::try_convert(v).map_err(|e| {
|
|
815
815
|
magnus::Error::new(
|
|
816
816
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -819,7 +819,7 @@ impl ConversionOptionsUpdate {
|
|
|
819
819
|
})?),
|
|
820
820
|
None => None,
|
|
821
821
|
},
|
|
822
|
-
list_indent_width: match kwargs.get(ruby.to_symbol("list_indent_width")) {
|
|
822
|
+
list_indent_width: match kwargs.get(ruby.to_symbol("list_indent_width")).filter(|v| !v.is_nil()) {
|
|
823
823
|
Some(v) => Some(usize::try_convert(v).map_err(|e| {
|
|
824
824
|
magnus::Error::new(
|
|
825
825
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -828,7 +828,7 @@ impl ConversionOptionsUpdate {
|
|
|
828
828
|
})?),
|
|
829
829
|
None => None,
|
|
830
830
|
},
|
|
831
|
-
bullets: match kwargs.get(ruby.to_symbol("bullets")) {
|
|
831
|
+
bullets: match kwargs.get(ruby.to_symbol("bullets")).filter(|v| !v.is_nil()) {
|
|
832
832
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
833
833
|
magnus::Error::new(
|
|
834
834
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -837,7 +837,7 @@ impl ConversionOptionsUpdate {
|
|
|
837
837
|
})?),
|
|
838
838
|
None => None,
|
|
839
839
|
},
|
|
840
|
-
strong_em_symbol: match kwargs.get(ruby.to_symbol("strong_em_symbol")) {
|
|
840
|
+
strong_em_symbol: match kwargs.get(ruby.to_symbol("strong_em_symbol")).filter(|v| !v.is_nil()) {
|
|
841
841
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
842
842
|
magnus::Error::new(
|
|
843
843
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -846,7 +846,7 @@ impl ConversionOptionsUpdate {
|
|
|
846
846
|
})?),
|
|
847
847
|
None => None,
|
|
848
848
|
},
|
|
849
|
-
escape_asterisks: match kwargs.get(ruby.to_symbol("escape_asterisks")) {
|
|
849
|
+
escape_asterisks: match kwargs.get(ruby.to_symbol("escape_asterisks")).filter(|v| !v.is_nil()) {
|
|
850
850
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
851
851
|
magnus::Error::new(
|
|
852
852
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -855,7 +855,7 @@ impl ConversionOptionsUpdate {
|
|
|
855
855
|
})?),
|
|
856
856
|
None => None,
|
|
857
857
|
},
|
|
858
|
-
escape_underscores: match kwargs.get(ruby.to_symbol("escape_underscores")) {
|
|
858
|
+
escape_underscores: match kwargs.get(ruby.to_symbol("escape_underscores")).filter(|v| !v.is_nil()) {
|
|
859
859
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
860
860
|
magnus::Error::new(
|
|
861
861
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -864,7 +864,7 @@ impl ConversionOptionsUpdate {
|
|
|
864
864
|
})?),
|
|
865
865
|
None => None,
|
|
866
866
|
},
|
|
867
|
-
escape_misc: match kwargs.get(ruby.to_symbol("escape_misc")) {
|
|
867
|
+
escape_misc: match kwargs.get(ruby.to_symbol("escape_misc")).filter(|v| !v.is_nil()) {
|
|
868
868
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
869
869
|
magnus::Error::new(
|
|
870
870
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -873,7 +873,7 @@ impl ConversionOptionsUpdate {
|
|
|
873
873
|
})?),
|
|
874
874
|
None => None,
|
|
875
875
|
},
|
|
876
|
-
escape_ascii: match kwargs.get(ruby.to_symbol("escape_ascii")) {
|
|
876
|
+
escape_ascii: match kwargs.get(ruby.to_symbol("escape_ascii")).filter(|v| !v.is_nil()) {
|
|
877
877
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
878
878
|
magnus::Error::new(
|
|
879
879
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -882,7 +882,7 @@ impl ConversionOptionsUpdate {
|
|
|
882
882
|
})?),
|
|
883
883
|
None => None,
|
|
884
884
|
},
|
|
885
|
-
code_language: match kwargs.get(ruby.to_symbol("code_language")) {
|
|
885
|
+
code_language: match kwargs.get(ruby.to_symbol("code_language")).filter(|v| !v.is_nil()) {
|
|
886
886
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
887
887
|
magnus::Error::new(
|
|
888
888
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -891,7 +891,7 @@ impl ConversionOptionsUpdate {
|
|
|
891
891
|
})?),
|
|
892
892
|
None => None,
|
|
893
893
|
},
|
|
894
|
-
autolinks: match kwargs.get(ruby.to_symbol("autolinks")) {
|
|
894
|
+
autolinks: match kwargs.get(ruby.to_symbol("autolinks")).filter(|v| !v.is_nil()) {
|
|
895
895
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
896
896
|
magnus::Error::new(
|
|
897
897
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -900,7 +900,7 @@ impl ConversionOptionsUpdate {
|
|
|
900
900
|
})?),
|
|
901
901
|
None => None,
|
|
902
902
|
},
|
|
903
|
-
default_title: match kwargs.get(ruby.to_symbol("default_title")) {
|
|
903
|
+
default_title: match kwargs.get(ruby.to_symbol("default_title")).filter(|v| !v.is_nil()) {
|
|
904
904
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
905
905
|
magnus::Error::new(
|
|
906
906
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -909,7 +909,7 @@ impl ConversionOptionsUpdate {
|
|
|
909
909
|
})?),
|
|
910
910
|
None => None,
|
|
911
911
|
},
|
|
912
|
-
br_in_tables: match kwargs.get(ruby.to_symbol("br_in_tables")) {
|
|
912
|
+
br_in_tables: match kwargs.get(ruby.to_symbol("br_in_tables")).filter(|v| !v.is_nil()) {
|
|
913
913
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
914
914
|
magnus::Error::new(
|
|
915
915
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -918,7 +918,7 @@ impl ConversionOptionsUpdate {
|
|
|
918
918
|
})?),
|
|
919
919
|
None => None,
|
|
920
920
|
},
|
|
921
|
-
compact_tables: match kwargs.get(ruby.to_symbol("compact_tables")) {
|
|
921
|
+
compact_tables: match kwargs.get(ruby.to_symbol("compact_tables")).filter(|v| !v.is_nil()) {
|
|
922
922
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
923
923
|
magnus::Error::new(
|
|
924
924
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -927,7 +927,7 @@ impl ConversionOptionsUpdate {
|
|
|
927
927
|
})?),
|
|
928
928
|
None => None,
|
|
929
929
|
},
|
|
930
|
-
highlight_style: match kwargs.get(ruby.to_symbol("highlight_style")) {
|
|
930
|
+
highlight_style: match kwargs.get(ruby.to_symbol("highlight_style")).filter(|v| !v.is_nil()) {
|
|
931
931
|
Some(v) => Some(HighlightStyle::try_convert(v).map_err(|e| {
|
|
932
932
|
magnus::Error::new(
|
|
933
933
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -936,7 +936,7 @@ impl ConversionOptionsUpdate {
|
|
|
936
936
|
})?),
|
|
937
937
|
None => None,
|
|
938
938
|
},
|
|
939
|
-
extract_metadata: match kwargs.get(ruby.to_symbol("extract_metadata")) {
|
|
939
|
+
extract_metadata: match kwargs.get(ruby.to_symbol("extract_metadata")).filter(|v| !v.is_nil()) {
|
|
940
940
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
941
941
|
magnus::Error::new(
|
|
942
942
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -945,7 +945,7 @@ impl ConversionOptionsUpdate {
|
|
|
945
945
|
})?),
|
|
946
946
|
None => None,
|
|
947
947
|
},
|
|
948
|
-
whitespace_mode: match kwargs.get(ruby.to_symbol("whitespace_mode")) {
|
|
948
|
+
whitespace_mode: match kwargs.get(ruby.to_symbol("whitespace_mode")).filter(|v| !v.is_nil()) {
|
|
949
949
|
Some(v) => Some(WhitespaceMode::try_convert(v).map_err(|e| {
|
|
950
950
|
magnus::Error::new(
|
|
951
951
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -954,7 +954,7 @@ impl ConversionOptionsUpdate {
|
|
|
954
954
|
})?),
|
|
955
955
|
None => None,
|
|
956
956
|
},
|
|
957
|
-
strip_newlines: match kwargs.get(ruby.to_symbol("strip_newlines")) {
|
|
957
|
+
strip_newlines: match kwargs.get(ruby.to_symbol("strip_newlines")).filter(|v| !v.is_nil()) {
|
|
958
958
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
959
959
|
magnus::Error::new(
|
|
960
960
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -963,7 +963,7 @@ impl ConversionOptionsUpdate {
|
|
|
963
963
|
})?),
|
|
964
964
|
None => None,
|
|
965
965
|
},
|
|
966
|
-
wrap: match kwargs.get(ruby.to_symbol("wrap")) {
|
|
966
|
+
wrap: match kwargs.get(ruby.to_symbol("wrap")).filter(|v| !v.is_nil()) {
|
|
967
967
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
968
968
|
magnus::Error::new(
|
|
969
969
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -972,7 +972,7 @@ impl ConversionOptionsUpdate {
|
|
|
972
972
|
})?),
|
|
973
973
|
None => None,
|
|
974
974
|
},
|
|
975
|
-
wrap_width: match kwargs.get(ruby.to_symbol("wrap_width")) {
|
|
975
|
+
wrap_width: match kwargs.get(ruby.to_symbol("wrap_width")).filter(|v| !v.is_nil()) {
|
|
976
976
|
Some(v) => Some(usize::try_convert(v).map_err(|e| {
|
|
977
977
|
magnus::Error::new(
|
|
978
978
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -981,7 +981,7 @@ impl ConversionOptionsUpdate {
|
|
|
981
981
|
})?),
|
|
982
982
|
None => None,
|
|
983
983
|
},
|
|
984
|
-
convert_as_inline: match kwargs.get(ruby.to_symbol("convert_as_inline")) {
|
|
984
|
+
convert_as_inline: match kwargs.get(ruby.to_symbol("convert_as_inline")).filter(|v| !v.is_nil()) {
|
|
985
985
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
986
986
|
magnus::Error::new(
|
|
987
987
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -990,7 +990,7 @@ impl ConversionOptionsUpdate {
|
|
|
990
990
|
})?),
|
|
991
991
|
None => None,
|
|
992
992
|
},
|
|
993
|
-
sub_symbol: match kwargs.get(ruby.to_symbol("sub_symbol")) {
|
|
993
|
+
sub_symbol: match kwargs.get(ruby.to_symbol("sub_symbol")).filter(|v| !v.is_nil()) {
|
|
994
994
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
995
995
|
magnus::Error::new(
|
|
996
996
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -999,7 +999,7 @@ impl ConversionOptionsUpdate {
|
|
|
999
999
|
})?),
|
|
1000
1000
|
None => None,
|
|
1001
1001
|
},
|
|
1002
|
-
sup_symbol: match kwargs.get(ruby.to_symbol("sup_symbol")) {
|
|
1002
|
+
sup_symbol: match kwargs.get(ruby.to_symbol("sup_symbol")).filter(|v| !v.is_nil()) {
|
|
1003
1003
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1004
1004
|
magnus::Error::new(
|
|
1005
1005
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1008,7 +1008,7 @@ impl ConversionOptionsUpdate {
|
|
|
1008
1008
|
})?),
|
|
1009
1009
|
None => None,
|
|
1010
1010
|
},
|
|
1011
|
-
newline_style: match kwargs.get(ruby.to_symbol("newline_style")) {
|
|
1011
|
+
newline_style: match kwargs.get(ruby.to_symbol("newline_style")).filter(|v| !v.is_nil()) {
|
|
1012
1012
|
Some(v) => Some(NewlineStyle::try_convert(v).map_err(|e| {
|
|
1013
1013
|
magnus::Error::new(
|
|
1014
1014
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1017,7 +1017,7 @@ impl ConversionOptionsUpdate {
|
|
|
1017
1017
|
})?),
|
|
1018
1018
|
None => None,
|
|
1019
1019
|
},
|
|
1020
|
-
code_block_style: match kwargs.get(ruby.to_symbol("code_block_style")) {
|
|
1020
|
+
code_block_style: match kwargs.get(ruby.to_symbol("code_block_style")).filter(|v| !v.is_nil()) {
|
|
1021
1021
|
Some(v) => Some(CodeBlockStyle::try_convert(v).map_err(|e| {
|
|
1022
1022
|
magnus::Error::new(
|
|
1023
1023
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1026,7 +1026,10 @@ impl ConversionOptionsUpdate {
|
|
|
1026
1026
|
})?),
|
|
1027
1027
|
None => None,
|
|
1028
1028
|
},
|
|
1029
|
-
keep_inline_images_in: match kwargs
|
|
1029
|
+
keep_inline_images_in: match kwargs
|
|
1030
|
+
.get(ruby.to_symbol("keep_inline_images_in"))
|
|
1031
|
+
.filter(|v| !v.is_nil())
|
|
1032
|
+
{
|
|
1030
1033
|
Some(v) => Some(<Vec<String>>::try_convert(v).map_err(|e| {
|
|
1031
1034
|
magnus::Error::new(
|
|
1032
1035
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1035,7 +1038,7 @@ impl ConversionOptionsUpdate {
|
|
|
1035
1038
|
})?),
|
|
1036
1039
|
None => None,
|
|
1037
1040
|
},
|
|
1038
|
-
preprocessing: match kwargs.get(ruby.to_symbol("preprocessing")) {
|
|
1041
|
+
preprocessing: match kwargs.get(ruby.to_symbol("preprocessing")).filter(|v| !v.is_nil()) {
|
|
1039
1042
|
Some(v) => Some(PreprocessingOptionsUpdate::try_convert(v).map_err(|e| {
|
|
1040
1043
|
magnus::Error::new(
|
|
1041
1044
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1044,7 +1047,7 @@ impl ConversionOptionsUpdate {
|
|
|
1044
1047
|
})?),
|
|
1045
1048
|
None => None,
|
|
1046
1049
|
},
|
|
1047
|
-
encoding: match kwargs.get(ruby.to_symbol("encoding")) {
|
|
1050
|
+
encoding: match kwargs.get(ruby.to_symbol("encoding")).filter(|v| !v.is_nil()) {
|
|
1048
1051
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1049
1052
|
magnus::Error::new(
|
|
1050
1053
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1053,7 +1056,7 @@ impl ConversionOptionsUpdate {
|
|
|
1053
1056
|
})?),
|
|
1054
1057
|
None => None,
|
|
1055
1058
|
},
|
|
1056
|
-
debug: match kwargs.get(ruby.to_symbol("debug")) {
|
|
1059
|
+
debug: match kwargs.get(ruby.to_symbol("debug")).filter(|v| !v.is_nil()) {
|
|
1057
1060
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
1058
1061
|
magnus::Error::new(
|
|
1059
1062
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1062,7 +1065,7 @@ impl ConversionOptionsUpdate {
|
|
|
1062
1065
|
})?),
|
|
1063
1066
|
None => None,
|
|
1064
1067
|
},
|
|
1065
|
-
strip_tags: match kwargs.get(ruby.to_symbol("strip_tags")) {
|
|
1068
|
+
strip_tags: match kwargs.get(ruby.to_symbol("strip_tags")).filter(|v| !v.is_nil()) {
|
|
1066
1069
|
Some(v) => Some(<Vec<String>>::try_convert(v).map_err(|e| {
|
|
1067
1070
|
magnus::Error::new(
|
|
1068
1071
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1071,7 +1074,7 @@ impl ConversionOptionsUpdate {
|
|
|
1071
1074
|
})?),
|
|
1072
1075
|
None => None,
|
|
1073
1076
|
},
|
|
1074
|
-
preserve_tags: match kwargs.get(ruby.to_symbol("preserve_tags")) {
|
|
1077
|
+
preserve_tags: match kwargs.get(ruby.to_symbol("preserve_tags")).filter(|v| !v.is_nil()) {
|
|
1075
1078
|
Some(v) => Some(<Vec<String>>::try_convert(v).map_err(|e| {
|
|
1076
1079
|
magnus::Error::new(
|
|
1077
1080
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1080,7 +1083,7 @@ impl ConversionOptionsUpdate {
|
|
|
1080
1083
|
})?),
|
|
1081
1084
|
None => None,
|
|
1082
1085
|
},
|
|
1083
|
-
skip_images: match kwargs.get(ruby.to_symbol("skip_images")) {
|
|
1086
|
+
skip_images: match kwargs.get(ruby.to_symbol("skip_images")).filter(|v| !v.is_nil()) {
|
|
1084
1087
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
1085
1088
|
magnus::Error::new(
|
|
1086
1089
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1089,7 +1092,7 @@ impl ConversionOptionsUpdate {
|
|
|
1089
1092
|
})?),
|
|
1090
1093
|
None => None,
|
|
1091
1094
|
},
|
|
1092
|
-
url_escape_style: match kwargs.get(ruby.to_symbol("url_escape_style")) {
|
|
1095
|
+
url_escape_style: match kwargs.get(ruby.to_symbol("url_escape_style")).filter(|v| !v.is_nil()) {
|
|
1093
1096
|
Some(v) => Some(UrlEscapeStyle::try_convert(v).map_err(|e| {
|
|
1094
1097
|
magnus::Error::new(
|
|
1095
1098
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1098,7 +1101,7 @@ impl ConversionOptionsUpdate {
|
|
|
1098
1101
|
})?),
|
|
1099
1102
|
None => None,
|
|
1100
1103
|
},
|
|
1101
|
-
link_style: match kwargs.get(ruby.to_symbol("link_style")) {
|
|
1104
|
+
link_style: match kwargs.get(ruby.to_symbol("link_style")).filter(|v| !v.is_nil()) {
|
|
1102
1105
|
Some(v) => Some(LinkStyle::try_convert(v).map_err(|e| {
|
|
1103
1106
|
magnus::Error::new(
|
|
1104
1107
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1107,7 +1110,7 @@ impl ConversionOptionsUpdate {
|
|
|
1107
1110
|
})?),
|
|
1108
1111
|
None => None,
|
|
1109
1112
|
},
|
|
1110
|
-
output_format: match kwargs.get(ruby.to_symbol("output_format")) {
|
|
1113
|
+
output_format: match kwargs.get(ruby.to_symbol("output_format")).filter(|v| !v.is_nil()) {
|
|
1111
1114
|
Some(v) => Some(OutputFormat::try_convert(v).map_err(|e| {
|
|
1112
1115
|
magnus::Error::new(
|
|
1113
1116
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1116,7 +1119,10 @@ impl ConversionOptionsUpdate {
|
|
|
1116
1119
|
})?),
|
|
1117
1120
|
None => None,
|
|
1118
1121
|
},
|
|
1119
|
-
include_document_structure: match kwargs
|
|
1122
|
+
include_document_structure: match kwargs
|
|
1123
|
+
.get(ruby.to_symbol("include_document_structure"))
|
|
1124
|
+
.filter(|v| !v.is_nil())
|
|
1125
|
+
{
|
|
1120
1126
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
1121
1127
|
magnus::Error::new(
|
|
1122
1128
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1125,7 +1131,7 @@ impl ConversionOptionsUpdate {
|
|
|
1125
1131
|
})?),
|
|
1126
1132
|
None => None,
|
|
1127
1133
|
},
|
|
1128
|
-
extract_images: match kwargs.get(ruby.to_symbol("extract_images")) {
|
|
1134
|
+
extract_images: match kwargs.get(ruby.to_symbol("extract_images")).filter(|v| !v.is_nil()) {
|
|
1129
1135
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
1130
1136
|
magnus::Error::new(
|
|
1131
1137
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1134,7 +1140,7 @@ impl ConversionOptionsUpdate {
|
|
|
1134
1140
|
})?),
|
|
1135
1141
|
None => None,
|
|
1136
1142
|
},
|
|
1137
|
-
max_image_size: match kwargs.get(ruby.to_symbol("max_image_size")) {
|
|
1143
|
+
max_image_size: match kwargs.get(ruby.to_symbol("max_image_size")).filter(|v| !v.is_nil()) {
|
|
1138
1144
|
Some(v) => Some(u64::try_convert(v).map_err(|e| {
|
|
1139
1145
|
magnus::Error::new(
|
|
1140
1146
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1143,7 +1149,7 @@ impl ConversionOptionsUpdate {
|
|
|
1143
1149
|
})?),
|
|
1144
1150
|
None => None,
|
|
1145
1151
|
},
|
|
1146
|
-
capture_svg: match kwargs.get(ruby.to_symbol("capture_svg")) {
|
|
1152
|
+
capture_svg: match kwargs.get(ruby.to_symbol("capture_svg")).filter(|v| !v.is_nil()) {
|
|
1147
1153
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
1148
1154
|
magnus::Error::new(
|
|
1149
1155
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1152,7 +1158,7 @@ impl ConversionOptionsUpdate {
|
|
|
1152
1158
|
})?),
|
|
1153
1159
|
None => None,
|
|
1154
1160
|
},
|
|
1155
|
-
infer_dimensions: match kwargs.get(ruby.to_symbol("infer_dimensions")) {
|
|
1161
|
+
infer_dimensions: match kwargs.get(ruby.to_symbol("infer_dimensions")).filter(|v| !v.is_nil()) {
|
|
1156
1162
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
1157
1163
|
magnus::Error::new(
|
|
1158
1164
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1161,7 +1167,7 @@ impl ConversionOptionsUpdate {
|
|
|
1161
1167
|
})?),
|
|
1162
1168
|
None => None,
|
|
1163
1169
|
},
|
|
1164
|
-
max_depth: match kwargs.get(ruby.to_symbol("max_depth")) {
|
|
1170
|
+
max_depth: match kwargs.get(ruby.to_symbol("max_depth")).filter(|v| !v.is_nil()) {
|
|
1165
1171
|
Some(v) => Some(usize::try_convert(v).map_err(|e| {
|
|
1166
1172
|
magnus::Error::new(
|
|
1167
1173
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1170,7 +1176,7 @@ impl ConversionOptionsUpdate {
|
|
|
1170
1176
|
})?),
|
|
1171
1177
|
None => None,
|
|
1172
1178
|
},
|
|
1173
|
-
exclude_selectors: match kwargs.get(ruby.to_symbol("exclude_selectors")) {
|
|
1179
|
+
exclude_selectors: match kwargs.get(ruby.to_symbol("exclude_selectors")).filter(|v| !v.is_nil()) {
|
|
1174
1180
|
Some(v) => Some(<Vec<String>>::try_convert(v).map_err(|e| {
|
|
1175
1181
|
magnus::Error::new(
|
|
1176
1182
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1179,7 +1185,7 @@ impl ConversionOptionsUpdate {
|
|
|
1179
1185
|
})?),
|
|
1180
1186
|
None => None,
|
|
1181
1187
|
},
|
|
1182
|
-
tier_strategy: match kwargs.get(ruby.to_symbol("tier_strategy")) {
|
|
1188
|
+
tier_strategy: match kwargs.get(ruby.to_symbol("tier_strategy")).filter(|v| !v.is_nil()) {
|
|
1183
1189
|
Some(v) => Some(TierStrategy::try_convert(v).map_err(|e| {
|
|
1184
1190
|
magnus::Error::new(
|
|
1185
1191
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1417,7 +1423,7 @@ impl ConversionResult {
|
|
|
1417
1423
|
let (kwargs_opt,) = args.optional;
|
|
1418
1424
|
let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
|
|
1419
1425
|
Ok(Self {
|
|
1420
|
-
content: match kwargs.get(ruby.to_symbol("content")) {
|
|
1426
|
+
content: match kwargs.get(ruby.to_symbol("content")).filter(|v| !v.is_nil()) {
|
|
1421
1427
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1422
1428
|
magnus::Error::new(
|
|
1423
1429
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1426,7 +1432,7 @@ impl ConversionResult {
|
|
|
1426
1432
|
})?),
|
|
1427
1433
|
None => None,
|
|
1428
1434
|
},
|
|
1429
|
-
document: match kwargs.get(ruby.to_symbol("document")) {
|
|
1435
|
+
document: match kwargs.get(ruby.to_symbol("document")).filter(|v| !v.is_nil()) {
|
|
1430
1436
|
Some(v) => Some(DocumentStructure::try_convert(v).map_err(|e| {
|
|
1431
1437
|
magnus::Error::new(
|
|
1432
1438
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1557,7 +1563,7 @@ impl DocumentMetadata {
|
|
|
1557
1563
|
let (kwargs_opt,) = args.optional;
|
|
1558
1564
|
let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
|
|
1559
1565
|
Ok(Self {
|
|
1560
|
-
title: match kwargs.get(ruby.to_symbol("title")) {
|
|
1566
|
+
title: match kwargs.get(ruby.to_symbol("title")).filter(|v| !v.is_nil()) {
|
|
1561
1567
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1562
1568
|
magnus::Error::new(
|
|
1563
1569
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1566,7 +1572,7 @@ impl DocumentMetadata {
|
|
|
1566
1572
|
})?),
|
|
1567
1573
|
None => None,
|
|
1568
1574
|
},
|
|
1569
|
-
description: match kwargs.get(ruby.to_symbol("description")) {
|
|
1575
|
+
description: match kwargs.get(ruby.to_symbol("description")).filter(|v| !v.is_nil()) {
|
|
1570
1576
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1571
1577
|
magnus::Error::new(
|
|
1572
1578
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1584,7 +1590,7 @@ impl DocumentMetadata {
|
|
|
1584
1590
|
})?,
|
|
1585
1591
|
None => Default::default(),
|
|
1586
1592
|
},
|
|
1587
|
-
author: match kwargs.get(ruby.to_symbol("author")) {
|
|
1593
|
+
author: match kwargs.get(ruby.to_symbol("author")).filter(|v| !v.is_nil()) {
|
|
1588
1594
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1589
1595
|
magnus::Error::new(
|
|
1590
1596
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1593,7 +1599,7 @@ impl DocumentMetadata {
|
|
|
1593
1599
|
})?),
|
|
1594
1600
|
None => None,
|
|
1595
1601
|
},
|
|
1596
|
-
canonical_url: match kwargs.get(ruby.to_symbol("canonical_url")) {
|
|
1602
|
+
canonical_url: match kwargs.get(ruby.to_symbol("canonical_url")).filter(|v| !v.is_nil()) {
|
|
1597
1603
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1598
1604
|
magnus::Error::new(
|
|
1599
1605
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1602,7 +1608,7 @@ impl DocumentMetadata {
|
|
|
1602
1608
|
})?),
|
|
1603
1609
|
None => None,
|
|
1604
1610
|
},
|
|
1605
|
-
base_href: match kwargs.get(ruby.to_symbol("base_href")) {
|
|
1611
|
+
base_href: match kwargs.get(ruby.to_symbol("base_href")).filter(|v| !v.is_nil()) {
|
|
1606
1612
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1607
1613
|
magnus::Error::new(
|
|
1608
1614
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1611,7 +1617,7 @@ impl DocumentMetadata {
|
|
|
1611
1617
|
})?),
|
|
1612
1618
|
None => None,
|
|
1613
1619
|
},
|
|
1614
|
-
language: match kwargs.get(ruby.to_symbol("language")) {
|
|
1620
|
+
language: match kwargs.get(ruby.to_symbol("language")).filter(|v| !v.is_nil()) {
|
|
1615
1621
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1616
1622
|
magnus::Error::new(
|
|
1617
1623
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1620,7 +1626,7 @@ impl DocumentMetadata {
|
|
|
1620
1626
|
})?),
|
|
1621
1627
|
None => None,
|
|
1622
1628
|
},
|
|
1623
|
-
text_direction: match kwargs.get(ruby.to_symbol("text_direction")) {
|
|
1629
|
+
text_direction: match kwargs.get(ruby.to_symbol("text_direction")).filter(|v| !v.is_nil()) {
|
|
1624
1630
|
Some(v) => Some(TextDirection::try_convert(v).map_err(|e| {
|
|
1625
1631
|
magnus::Error::new(
|
|
1626
1632
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1781,7 +1787,7 @@ impl DocumentNode {
|
|
|
1781
1787
|
));
|
|
1782
1788
|
}
|
|
1783
1789
|
},
|
|
1784
|
-
parent: match kwargs.get(ruby.to_symbol("parent")) {
|
|
1790
|
+
parent: match kwargs.get(ruby.to_symbol("parent")).filter(|v| !v.is_nil()) {
|
|
1785
1791
|
Some(v) => Some(u32::try_convert(v).map_err(|e| {
|
|
1786
1792
|
magnus::Error::new(
|
|
1787
1793
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1808,7 +1814,7 @@ impl DocumentNode {
|
|
|
1808
1814
|
})?,
|
|
1809
1815
|
None => vec![],
|
|
1810
1816
|
},
|
|
1811
|
-
attributes: match kwargs.get(ruby.to_symbol("attributes")) {
|
|
1817
|
+
attributes: match kwargs.get(ruby.to_symbol("attributes")).filter(|v| !v.is_nil()) {
|
|
1812
1818
|
Some(v) => Some(<HashMap<String, String>>::try_convert(v).map_err(|e| {
|
|
1813
1819
|
magnus::Error::new(
|
|
1814
1820
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -1896,7 +1902,7 @@ impl DocumentStructure {
|
|
|
1896
1902
|
})?,
|
|
1897
1903
|
None => Default::default(),
|
|
1898
1904
|
},
|
|
1899
|
-
source_format: match kwargs.get(ruby.to_symbol("source_format")) {
|
|
1905
|
+
source_format: match kwargs.get(ruby.to_symbol("source_format")).filter(|v| !v.is_nil()) {
|
|
1900
1906
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
1901
1907
|
magnus::Error::new(
|
|
1902
1908
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -2139,7 +2145,7 @@ impl HeaderMetadata {
|
|
|
2139
2145
|
})?,
|
|
2140
2146
|
None => Default::default(),
|
|
2141
2147
|
},
|
|
2142
|
-
id: match kwargs.get(ruby.to_symbol("id")) {
|
|
2148
|
+
id: match kwargs.get(ruby.to_symbol("id")).filter(|v| !v.is_nil()) {
|
|
2143
2149
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
2144
2150
|
magnus::Error::new(
|
|
2145
2151
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -2479,7 +2485,7 @@ impl ImageMetadata {
|
|
|
2479
2485
|
})?,
|
|
2480
2486
|
None => Default::default(),
|
|
2481
2487
|
},
|
|
2482
|
-
alt: match kwargs.get(ruby.to_symbol("alt")) {
|
|
2488
|
+
alt: match kwargs.get(ruby.to_symbol("alt")).filter(|v| !v.is_nil()) {
|
|
2483
2489
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
2484
2490
|
magnus::Error::new(
|
|
2485
2491
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -2488,7 +2494,7 @@ impl ImageMetadata {
|
|
|
2488
2494
|
})?),
|
|
2489
2495
|
None => None,
|
|
2490
2496
|
},
|
|
2491
|
-
title: match kwargs.get(ruby.to_symbol("title")) {
|
|
2497
|
+
title: match kwargs.get(ruby.to_symbol("title")).filter(|v| !v.is_nil()) {
|
|
2492
2498
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
2493
2499
|
magnus::Error::new(
|
|
2494
2500
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -2497,7 +2503,7 @@ impl ImageMetadata {
|
|
|
2497
2503
|
})?),
|
|
2498
2504
|
None => None,
|
|
2499
2505
|
},
|
|
2500
|
-
dimensions: match kwargs.get(ruby.to_symbol("dimensions")) {
|
|
2506
|
+
dimensions: match kwargs.get(ruby.to_symbol("dimensions")).filter(|v| !v.is_nil()) {
|
|
2501
2507
|
Some(v) => Some(ImageDimensions::try_convert(v).map_err(|e| {
|
|
2502
2508
|
magnus::Error::new(
|
|
2503
2509
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -2626,7 +2632,7 @@ impl LinkMetadata {
|
|
|
2626
2632
|
})?,
|
|
2627
2633
|
None => Default::default(),
|
|
2628
2634
|
},
|
|
2629
|
-
title: match kwargs.get(ruby.to_symbol("title")) {
|
|
2635
|
+
title: match kwargs.get(ruby.to_symbol("title")).filter(|v| !v.is_nil()) {
|
|
2630
2636
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
2631
2637
|
magnus::Error::new(
|
|
2632
2638
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -2859,7 +2865,7 @@ impl NodeContext {
|
|
|
2859
2865
|
})?,
|
|
2860
2866
|
None => Default::default(),
|
|
2861
2867
|
},
|
|
2862
|
-
parent_tag: match kwargs.get(ruby.to_symbol("parent_tag")) {
|
|
2868
|
+
parent_tag: match kwargs.get(ruby.to_symbol("parent_tag")).filter(|v| !v.is_nil()) {
|
|
2863
2869
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
2864
2870
|
magnus::Error::new(
|
|
2865
2871
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -2913,6 +2919,10 @@ impl NodeContext {
|
|
|
2913
2919
|
.collect()
|
|
2914
2920
|
}
|
|
2915
2921
|
|
|
2922
|
+
#[allow(
|
|
2923
|
+
clippy::wrong_self_convention,
|
|
2924
|
+
reason = "Ruby borrows wrapper instances while consuming a cloned core value"
|
|
2925
|
+
)]
|
|
2916
2926
|
fn into_owned(&self) -> NodeContext {
|
|
2917
2927
|
let core_self = html_to_markdown_rs::NodeContext::from(self.clone());
|
|
2918
2928
|
core_self.into_owned().into()
|
|
@@ -3086,7 +3096,7 @@ impl PreprocessingOptionsUpdate {
|
|
|
3086
3096
|
let (kwargs_opt,) = args.optional;
|
|
3087
3097
|
let kwargs = kwargs_opt.unwrap_or_else(|| ruby.hash_new());
|
|
3088
3098
|
Ok(Self {
|
|
3089
|
-
enabled: match kwargs.get(ruby.to_symbol("enabled")) {
|
|
3099
|
+
enabled: match kwargs.get(ruby.to_symbol("enabled")).filter(|v| !v.is_nil()) {
|
|
3090
3100
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
3091
3101
|
magnus::Error::new(
|
|
3092
3102
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -3095,7 +3105,7 @@ impl PreprocessingOptionsUpdate {
|
|
|
3095
3105
|
})?),
|
|
3096
3106
|
None => None,
|
|
3097
3107
|
},
|
|
3098
|
-
preset: match kwargs.get(ruby.to_symbol("preset")) {
|
|
3108
|
+
preset: match kwargs.get(ruby.to_symbol("preset")).filter(|v| !v.is_nil()) {
|
|
3099
3109
|
Some(v) => Some(PreprocessingPreset::try_convert(v).map_err(|e| {
|
|
3100
3110
|
magnus::Error::new(
|
|
3101
3111
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -3104,7 +3114,7 @@ impl PreprocessingOptionsUpdate {
|
|
|
3104
3114
|
})?),
|
|
3105
3115
|
None => None,
|
|
3106
3116
|
},
|
|
3107
|
-
remove_navigation: match kwargs.get(ruby.to_symbol("remove_navigation")) {
|
|
3117
|
+
remove_navigation: match kwargs.get(ruby.to_symbol("remove_navigation")).filter(|v| !v.is_nil()) {
|
|
3108
3118
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
3109
3119
|
magnus::Error::new(
|
|
3110
3120
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -3113,7 +3123,7 @@ impl PreprocessingOptionsUpdate {
|
|
|
3113
3123
|
})?),
|
|
3114
3124
|
None => None,
|
|
3115
3125
|
},
|
|
3116
|
-
remove_forms: match kwargs.get(ruby.to_symbol("remove_forms")) {
|
|
3126
|
+
remove_forms: match kwargs.get(ruby.to_symbol("remove_forms")).filter(|v| !v.is_nil()) {
|
|
3117
3127
|
Some(v) => Some(bool::try_convert(v).map_err(|e| {
|
|
3118
3128
|
magnus::Error::new(
|
|
3119
3129
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -3290,7 +3300,7 @@ impl StructuredData {
|
|
|
3290
3300
|
})?,
|
|
3291
3301
|
None => Default::default(),
|
|
3292
3302
|
},
|
|
3293
|
-
schema_type: match kwargs.get(ruby.to_symbol("schema_type")) {
|
|
3303
|
+
schema_type: match kwargs.get(ruby.to_symbol("schema_type")).filter(|v| !v.is_nil()) {
|
|
3294
3304
|
Some(v) => Some(String::try_convert(v).map_err(|e| {
|
|
3295
3305
|
magnus::Error::new(
|
|
3296
3306
|
unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
|
|
@@ -4909,13 +4919,20 @@ pub fn convert(args: &[magnus::Value]) -> Result<ConversionResult, Error> {
|
|
|
4909
4919
|
} else {
|
|
4910
4920
|
let bridge = RbHtmlVisitorBridge::new(v, String::new())?;
|
|
4911
4921
|
let handle = std::sync::Arc::new(std::sync::Mutex::new(bridge)) as html_to_markdown_rs::VisitorHandle;
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4922
|
+
#[allow(
|
|
4923
|
+
clippy::field_reassign_with_default,
|
|
4924
|
+
reason = "External options may be non-exhaustive or contain private fields"
|
|
4925
|
+
)]
|
|
4926
|
+
{
|
|
4927
|
+
let mut opts = html_to_markdown_rs::ConversionOptions::default();
|
|
4928
|
+
opts.visitor = Some(handle);
|
|
4929
|
+
opts
|
|
4930
|
+
}
|
|
4915
4931
|
}
|
|
4916
4932
|
}
|
|
4917
4933
|
_ => html_to_markdown_rs::ConversionOptions::default(),
|
|
4918
4934
|
};
|
|
4935
|
+
|
|
4919
4936
|
html_to_markdown_rs::convert(&html, Some(options_core))
|
|
4920
4937
|
.map(|val| val.into())
|
|
4921
4938
|
.map_err(|e| {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:cc524cd24840e9205c5f1e9a5429f00d3b9c390ae1decedd74ea0dabc8973dee
|
|
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.12.
|
|
9
|
+
VERSION = "3.12.3"
|
|
10
10
|
end
|