# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.94.0"
name = "ndg-commonmark"
version = "2.7.2"
authors = ["NotAShelf <raf@notashelf.dev>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Flavored CommonMark processor for Nix-related projects, with support for CommonMark, GFM, and Nixpkgs extensions."
readme = "README.md"
keywords = [
    "markdown",
    "nix",
    "nixpkgs",
    "nixos",
    "documentation",
]
categories = ["text-processing"]
license = "MPL-2.0"
repository = "https://github.com/feel-co/ndg"

[package.metadata.docs.rs]
cargo-args = [
    "-Zunstable-options",
    "-Zrustdoc-scrape-examples",
]

[features]
default = [
    "ndg-flavored",
    "syntastica",
]
gfm = []
ndg-flavored = [
    "gfm",
    "nixpkgs",
    "wiki",
]
nixpkgs = []
syntastica = [
    "dep:syntastica",
    "dep:syntastica-core",
    "dep:syntastica-parsers",
    "dep:syntastica-themes",
    "dep:syntastica-query-preprocessor",
]
syntect = [
    "dep:syntect",
    "dep:two-face",
]
wiki = []

[lib]
name = "ndg_commonmark"
path = "src/lib.rs"

[[example]]
name = "demo"
path = "examples/demo.rs"

[[example]]
name = "processor"
path = "examples/processor.rs"

[[example]]
name = "syntax"
path = "examples/syntax.rs"

[[test]]
name = "formatter_markup"
path = "tests/formatter_markup.rs"

[[test]]
name = "header_extraction"
path = "tests/header_extraction.rs"

[[test]]
name = "integration"
path = "tests/integration.rs"

[[test]]
name = "markup"
path = "tests/markup.rs"

[[test]]
name = "processor"
path = "tests/processor.rs"

[[test]]
name = "prompt_transformer"
path = "tests/prompt_transformer.rs"

[[test]]
name = "strip_markdown"
path = "tests/strip_markdown.rs"

[[test]]
name = "syntax"
path = "tests/syntax.rs"

[dependencies.comrak]
version = "0.52.0"
features = ["syntect"]
default-features = false

[dependencies.html-escape]
version = "0.2.13"

[dependencies.kuchikikiki]
version = "0.12.0"

[dependencies.log]
version = "0.4.29"

[dependencies.markup5ever]
version = "0.39.0"

[dependencies.regex]
version = "1.12.3"

[dependencies.serde]
version = "1.0.228"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.149"
features = ["preserve_order"]
default-features = false

[dependencies.syntastica]
version = "0.6.1"
optional = true

[dependencies.syntastica-core]
version = "0.6.1"
optional = true

[dependencies.syntastica-parsers]
version = "0.6.1"
features = ["most"]
optional = true

[dependencies.syntastica-query-preprocessor]
version = "0.6.1"
optional = true

[dependencies.syntastica-themes]
version = "0.6.1"
optional = true

[dependencies.syntect]
version = "5.3.0"
optional = true

[dependencies.tendril]
version = "0.5.0"

[dependencies.thiserror]
version = "2.0.18"

[dependencies.two-face]
version = "0.5.1"
features = ["syntect-default-onig"]
optional = true

[dependencies.walkdir]
version = "2.5.0"

[dev-dependencies.tempfile]
version = "3.27.0"

[lints.clippy]
absolute_paths = "allow"
arbitrary_source_item_ordering = "allow"
cargo_common_metadata = "allow"
clone_on_ref_ptr = "warn"
dbg_macro = "warn"
empty_drop = "warn"
empty_structs_with_brackets = "warn"
exit = "warn"
expect_used = "warn"
filetype_is_file = "warn"
get_unwrap = "warn"
implicit_return = "allow"
infinite_loop = "warn"
map_with_unused_argument_over_ranges = "warn"
missing_docs_in_private_items = "allow"
multiple_crate_versions = "allow"
non_ascii_literal = "allow"
non_std_lazy_statics = "warn"
panic = "deny"
pathbuf_init_then_push = "warn"
pattern_type_mismatch = "allow"
print_stderr = "warn"
print_stdout = "warn"
question_mark_used = "allow"
rc_buffer = "warn"
rc_mutex = "warn"
rest_pat_in_fully_bound_structs = "warn"
similar_names = "allow"
single_call_fn = "allow"
std_instead_of_core = "allow"
todo = "warn"
too_long_first_doc_paragraph = "allow"
too_many_lines = "allow"
undocumented_unsafe_blocks = "warn"
unimplemented = "warn"
unnecessary_safety_comment = "warn"
unreachable = "warn"
unused_result_ok = "warn"
unused_trait_names = "allow"
unwrap_used = "deny"

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.clippy.complexity]
level = "warn"
priority = -1

[lints.clippy.nursery]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.clippy.perf]
level = "warn"
priority = -1

[lints.clippy.style]
level = "warn"
priority = -1
