1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 James Conway
//! Parsec: an HTML parser that follows the WHATWG HTML Standard, with CSS
//! selectors and a tree you can change and write back out, and the other
//! standards a page needs beside it.
//!
//! The parser is at the top of this crate, and each standard is a module
//! behind a cargo feature:
//!
//! | Module | Feature | Default |
//! |---|---|---|
//! | `encoding` | `encoding` | on |
//! | `url` | `url` | on |
//! | `xpath` | `xpath` | on |
//! | `stylesheet` | `css` | off |
//!
//! [`css`] is the selector engine, which is always here; `stylesheet` is
//! CSS Syntax and the cascade, which a scraper rarely needs.
//!
//! ```
//! use parsec::css::SelectorList;
//!
//! let doc = parsec::parse("<ul><li class=hit>one<li>two</ul>", false);
//! let hits = SelectorList::parse("li.hit").unwrap().select(&doc, doc.root());
//! assert_eq!(doc.text(hits[0]), "one");
//! ```
pub use *;
pub use parsec_encoding as encoding;
pub use parsec_url as url;
pub use parsec_xpath as xpath;
pub use parsec_css as stylesheet;