mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-13 11:54:50 +00:00
WordCraft's crates/formats/src/html (07f97737) as craft_html::doc: the tag-soup builder, CSS subset, ruby and MathML reading, page decoding and the writer, with its 44 tests. It reads tokens from this crate's tokenizer through a small adapter (decoded text and attributes, names in lower case) instead of its own lexer, and its character references are this crate's. Lexer::set_pos is new: the ruby reader hands a token back. The HTML parts of WordCraft's MathML and cross-format tests come along as tests/doc.rs, the linear-time check as a ratio.
31 lines
1.0 KiB
TOML
31 lines
1.0 KiB
TOML
[package]
|
|
name = "craft-html"
|
|
description = "The bottom layer of reading and writing HTML: a tolerant tokenizer, character references, escaping and the charset a page declares. No tree, no CSS, no rendering."
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
# HTML documents: read into and written from the craft-flow model and a craft-wordmodel Document.
|
|
flow = ["dep:craft-codepage", "dep:craft-flow", "dep:craft-math", "dep:craft-mime", "dep:craft-wordmodel", "dep:encoding_rs"]
|
|
|
|
[dependencies]
|
|
craft-codepage = { workspace = true, optional = true }
|
|
craft-flow = { workspace = true, optional = true }
|
|
craft-math = { workspace = true, optional = true }
|
|
craft-mime = { workspace = true, features = ["detect"], optional = true }
|
|
craft-wordmodel = { workspace = true, optional = true }
|
|
encoding_rs = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
proptest = { workspace = true }
|
|
|
|
[[test]]
|
|
name = "doc"
|
|
required-features = ["flow"]
|