[package]
edition = "2024"
rust-version = "1.85"
name = "html-to-markdown-rs"
version = "3.6.21"
authors = ["Na'aman Hirschfeld <naaman@kreuzberg.dev>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance HTML to Markdown converter using the astral-tl parser. Part of the Kreuzberg ecosystem."
homepage = "https://kreuzberg.dev"
documentation = "https://docs.rs/html-to-markdown-rs"
readme = "README.md"
keywords = [
"html",
"markdown",
"converter",
"astral-tl",
"doc-processing",
]
categories = [
"parsing",
"text-processing",
"web-programming",
]
license = "MIT"
repository = "https://github.com/kreuzberg-dev/html-to-markdown"
resolver = "2"
[package.metadata.cargo-machete]
ignored = [
"once_cell",
"ahash",
]
[features]
default = ["metadata"]
full = [
"inline-images",
"metadata",
"visitor",
"serde",
]
inline-images = ["dep:image"]
mcp = [
"dep:rmcp",
"dep:tokio",
"dep:schemars",
"serde",
]
mcp-http = [
"mcp",
"dep:axum",
]
metadata = [
"dep:serde",
"dep:serde_json",
]
serde = [
"dep:serde",
"dep:serde_json",
]
testkit = []
visitor = []
[lib]
name = "html_to_markdown_rs"
crate-type = ["rlib"]
path = "src/lib.rs"
[[example]]
name = "basic"
path = "examples/basic.rs"
[[example]]
name = "table"
path = "examples/table.rs"
[[example]]
name = "test_deser"
path = "examples/test_deser.rs"
[[example]]
name = "test_escape"
path = "examples/test_escape.rs"
[[example]]
name = "test_inline_formatting"
path = "examples/test_inline_formatting.rs"
[[example]]
name = "test_lists"
path = "examples/test_lists.rs"
[[example]]
name = "test_semantic_tags"
path = "examples/test_semantic_tags.rs"
[[example]]
name = "test_tables"
path = "examples/test_tables.rs"
[[example]]
name = "test_task_lists"
path = "examples/test_task_lists.rs"
[[example]]
name = "test_whitespace"
path = "examples/test_whitespace.rs"
[[test]]
name = "br_in_inline_test"
path = "tests/br_in_inline_test.rs"
[[test]]
name = "commonmark_compliance_test"
path = "tests/commonmark_compliance_test.rs"
[[test]]
name = "compact_tables_test"
path = "tests/compact_tables_test.rs"
[[test]]
name = "concurrency_test"
path = "tests/concurrency_test.rs"
[[test]]
name = "djot_output_test"
path = "tests/djot_output_test.rs"
[[test]]
name = "exclude_selectors_test"
path = "tests/exclude_selectors_test.rs"
[[test]]
name = "integration_test"
path = "tests/integration_test.rs"
[[test]]
name = "issue_121_regressions"
path = "tests/issue_121_regressions.rs"
[[test]]
name = "issue_127_regressions"
path = "tests/issue_127_regressions.rs"
[[test]]
name = "issue_128_regressions"
path = "tests/issue_128_regressions.rs"
[[test]]
name = "issue_131_regressions"
path = "tests/issue_131_regressions.rs"
[[test]]
name = "issue_134_regressions"
path = "tests/issue_134_regressions.rs"
[[test]]
name = "issue_139_regressions"
path = "tests/issue_139_regressions.rs"
[[test]]
name = "issue_140_regressions"
path = "tests/issue_140_regressions.rs"
[[test]]
name = "issue_143_regressions"
path = "tests/issue_143_regressions.rs"
[[test]]
name = "issue_145_regressions"
path = "tests/issue_145_regressions.rs"
[[test]]
name = "issue_146_regressions"
path = "tests/issue_146_regressions.rs"
[[test]]
name = "issue_176_regressions"
path = "tests/issue_176_regressions.rs"
[[test]]
name = "issue_190_regressions"
path = "tests/issue_190_regressions.rs"
[[test]]
name = "issue_199_regressions"
path = "tests/issue_199_regressions.rs"
[[test]]
name = "issue_200_regressions"
path = "tests/issue_200_regressions.rs"
[[test]]
name = "issue_212_regressions"
path = "tests/issue_212_regressions.rs"
[[test]]
name = "issue_216_217_regressions"
path = "tests/issue_216_217_regressions.rs"
[[test]]
name = "issue_336_regressions"
path = "tests/issue_336_regressions.rs"
[[test]]
name = "issue_339_regressions"
path = "tests/issue_339_regressions.rs"
[[test]]
name = "issue_347_regressions"
path = "tests/issue_347_regressions.rs"
[[test]]
name = "issue_348_visitor_plain"
path = "tests/issue_348_visitor_plain.rs"
[[test]]
name = "issue_391_xhtml_self_closing"
path = "tests/issue_391_xhtml_self_closing.rs"
[[test]]
name = "issue_396_backticks_blank_line"
path = "tests/issue_396_backticks_blank_line.rs"
[[test]]
name = "issue_397_strict_autolink"
path = "tests/issue_397_strict_autolink.rs"
[[test]]
name = "issue_398_convert_into_option"
path = "tests/issue_398_convert_into_option.rs"
[[test]]
name = "issue_399_md012_blank_lines"
path = "tests/issue_399_md012_blank_lines.rs"
[[test]]
name = "issue_406_table_perf_test"
path = "tests/issue_406_table_perf_test.rs"
[[test]]
name = "json_ld_script_extraction"
path = "tests/json_ld_script_extraction.rs"
[[test]]
name = "lists_test"
path = "tests/lists_test.rs"
[[test]]
name = "nested_list_duplication"
path = "tests/nested_list_duplication.rs"
[[test]]
name = "perf_nested_layout_tables"
path = "tests/perf_nested_layout_tables.rs"
[[test]]
name = "plain_output_test"
path = "tests/plain_output_test.rs"
[[test]]
name = "preprocessing_tests"
path = "tests/preprocessing_tests.rs"
[[test]]
name = "prescan_test"
path = "tests/prescan_test.rs"
[[test]]
name = "reference_links_test"
path = "tests/reference_links_test.rs"
[[test]]
name = "regression_379"
path = "tests/regression_379.rs"
[[test]]
name = "regression_380"
path = "tests/regression_380.rs"
[[test]]
name = "sectioning_elements_test"
path = "tests/sectioning_elements_test.rs"
[[test]]
name = "skip_images_test"
path = "tests/skip_images_test.rs"
[[test]]
name = "tables_test"
path = "tests/tables_test.rs"
[[test]]
name = "test_custom_elements"
path = "tests/test_custom_elements.rs"
[[test]]
name = "test_enum_serde"
path = "tests/test_enum_serde.rs"
[[test]]
name = "test_highlight_bold"
path = "tests/test_highlight_bold.rs"
[[test]]
name = "test_issue_187"
path = "tests/test_issue_187.rs"
[[test]]
name = "test_issue_218"
path = "tests/test_issue_218.rs"
[[test]]
name = "test_issue_277"
path = "tests/test_issue_277.rs"
[[test]]
name = "test_max_depth"
path = "tests/test_max_depth.rs"
[[test]]
name = "test_nested_simple"
path = "tests/test_nested_simple.rs"
[[test]]
name = "test_script_style_stripping"
path = "tests/test_script_style_stripping.rs"
[[test]]
name = "test_spa_bisect"
path = "tests/test_spa_bisect.rs"
[[test]]
name = "tier1_alt_entity_test"
path = "tests/tier1_alt_entity_test.rs"
[[test]]
name = "tier1_bail_test"
path = "tests/tier1_bail_test.rs"
[[test]]
name = "tier1_bail_variants_test"
path = "tests/tier1_bail_variants_test.rs"
[[test]]
name = "tier1_byte_equality_test"
path = "tests/tier1_byte_equality_test.rs"
[[test]]
name = "tier1_code_escape_test"
path = "tests/tier1_code_escape_test.rs"
[[test]]
name = "tier1_entity_bail_test"
path = "tests/tier1_entity_bail_test.rs"
[[test]]
name = "tier1_figcaption_test"
path = "tests/tier1_figcaption_test.rs"
[[test]]
name = "tier1_inter_tag_whitespace_test"
path = "tests/tier1_inter_tag_whitespace_test.rs"
[[test]]
name = "tier1_kbd_samp_test"
path = "tests/tier1_kbd_samp_test.rs"
[[test]]
name = "tier1_keep_inline_images_test"
path = "tests/tier1_keep_inline_images_test.rs"
[[test]]
name = "tier1_list_paragraph_test"
path = "tests/tier1_list_paragraph_test.rs"
[[test]]
name = "tier1_metadata_test"
path = "tests/tier1_metadata_test.rs"
[[test]]
name = "tier1_processing_instruction_test"
path = "tests/tier1_processing_instruction_test.rs"
[[test]]
name = "tier1_property_test"
path = "tests/tier1_property_test.rs"
[[test]]
name = "tier1_router_style_gate_test"
path = "tests/tier1_router_style_gate_test.rs"
[[test]]
name = "tier1_router_test"
path = "tests/tier1_router_test.rs"
[[test]]
name = "tier1_scanner_test"
path = "tests/tier1_scanner_test.rs"
[[test]]
name = "tier1_spec_rules_test"
path = "tests/tier1_spec_rules_test.rs"
[[test]]
name = "tier1_strikethrough_test"
path = "tests/tier1_strikethrough_test.rs"
[[test]]
name = "tier1_summary_test"
path = "tests/tier1_summary_test.rs"
[[test]]
name = "tier1_tables_test"
path = "tests/tier1_tables_test.rs"
[[test]]
name = "tier1_tags_test"
path = "tests/tier1_tags_test.rs"
[[test]]
name = "tier1_text_chomp_test"
path = "tests/tier1_text_chomp_test.rs"
[[test]]
name = "utf8_dedent_regression_test"
path = "tests/utf8_dedent_regression_test.rs"
[[test]]
name = "visitor_code_integration_test"
path = "tests/visitor_code_integration_test.rs"
[[test]]
name = "visitor_integration_test"
path = "tests/visitor_integration_test.rs"
[[test]]
name = "xml_tables_test"
path = "tests/xml_tables_test.rs"
[dependencies.ahash]
version = "0.8"
features = [
"std",
"compile-time-rng",
]
default-features = false
[dependencies.axum]
version = "0.8"
optional = true
[dependencies.base64]
version = "0.22"
[dependencies.bitflags]
version = "2"
[dependencies.html-escape]
version = "0.2.13"
[dependencies.html5ever]
version = "0.39.0"
[dependencies.image]
version = "0.25"
features = [
"gif",
"jpeg",
"png",
"bmp",
"webp",
]
optional = true
default-features = false
[dependencies.lru]
version = "0.18"
[dependencies.memchr]
version = "2"
[dependencies.once_cell]
version = "1.21"
[dependencies.phf]
version = "0.13"
features = ["macros"]
[dependencies.regex]
version = "1.12"
[dependencies.rmcp]
version = "1.7.0"
features = [
"server",
"macros",
"transport-io",
"transport-streamable-http-server",
"server-side-http",
]
optional = true
[dependencies.schemars]
version = "1.2.1"
optional = true
[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "1.0"
optional = true
[dependencies.thiserror]
version = "2.0"
[dependencies.tl]
version = "0.7.11"
package = "astral-tl"
[dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
"io-std",
]
optional = true
[dev-dependencies.serde]
version = "1.0"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1.0"
[lints.clippy.all]
level = "deny"
priority = -1
[lints.clippy.arc_with_non_send_sync]
level = "allow"
priority = 1
[lints.clippy.cargo]
level = "warn"
priority = -1
[lints.clippy.cargo_common_metadata]
level = "allow"
priority = 1
[lints.clippy.derivable_impls]
level = "allow"
priority = 1
[lints.clippy.multiple_crate_versions]
level = "allow"
priority = 1
[lints.clippy.needless_borrows_for_generic_args]
level = "allow"
priority = 1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.clippy.unnecessary_cast]
level = "allow"
priority = 1
[lints.clippy.unnecessary_fallible_conversions]
level = "allow"
priority = 1
[lints.clippy.unnecessary_wraps]
level = "allow"
priority = 1
[lints.clippy.unused_unit]
level = "allow"
priority = 1
[lints.clippy.unwrap_or_default]
level = "allow"
priority = 1
[lints.clippy.useless_conversion]
level = "allow"
priority = 1
[lints.rust]
missing_docs = "warn"
unsafe_code = "forbid"
unused_must_use = "deny"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
"cfg(alef)",
'cfg(feature, values("testkit"))',
]