[package]
name = "devup-editor-html"
description = "HTML ↔ Document conversion + clipboard-mode support (tables, Notion heuristics, data-devup-props round-trip) for devup-editor"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true

[dependencies]
base64 = "0.22"
devup-editor-core.workspace = true
# html5ever / markup5ever / markup5ever_rcdom must move in lockstep — the
# rcdom crate is gated to a specific html5ever/markup5ever release. We
# stay on the 0.38 line because that's the highest line where the
# (unofficially-republished) `markup5ever_rcdom` exists on crates.io
# (0.39 of html5ever/markup5ever has no matching rcdom release yet).
#
# Migrated off the previous git-rev pin to make crates.io publishing
# possible: cargo refuses to publish a crate whose git deps don't carry
# a `version` requirement.
html5ever = "0.38"
markup5ever = "0.38"
# `0.38.0+unofficial` on crates.io — the `+unofficial` build-metadata is
# stripped by cargo during version matching, so the bare "0.38" requirement
# resolves to that release.
markup5ever_rcdom = "0.38"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"

[lints.rust]
unsafe_code = "warn"

[lints.clippy]
all = "warn"
pedantic = "warn"
# Style / ergonomic lints we deliberately tolerate in clipboard code
# — the port mirrors the upstream TS structure verbatim and these
# patterns are idiomatic within that mirror.
#
# Correctness-flavoured lints (cast_*, float_cmp) that used to be on
# this list were re-enabled during the post-commit audit: allowing
# them hid potential parsing bugs in untrusted clipboard HTML (the
# `extract_row_props` panic fix uncovered the class). Any cast now
# lives behind a deliberate `#[allow(...)]` with a justification
# comment, or uses `try_from` / bounds-checked conversions.
module_name_repetitions = "allow"
too_many_lines = "allow"
doc_markdown = "allow"
match_same_arms = "allow"
map_unwrap_or = "allow"
redundant_closure_for_method_calls = "allow"
redundant_closure = "allow"
similar_names = "allow"
unreadable_literal = "allow"
needless_pass_by_value = "allow"
uninlined_format_args = "allow"
manual_let_else = "allow"
option_if_let_else = "allow"
unnecessary_wraps = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
must_use_candidate = "allow"
return_self_not_must_use = "allow"
wildcard_imports = "allow"
used_underscore_items = "allow"
items_after_statements = "allow"
struct_excessive_bools = "allow"
unused_self = "allow"
manual_contains = "allow"
needless_lifetimes = "allow"
should_panic_without_expect = "allow"
ref_option = "allow"
trivially_copy_pass_by_ref = "allow"
single_match_else = "allow"
cognitive_complexity = "allow"
no_effect_underscore_binding = "allow"
branches_sharing_code = "allow"
needless_for_each = "allow"
unnecessary_debug_formatting = "allow"
format_push_string = "allow"
