1#![doc = include_str!("../README.md")]
2#![warn(
3 missing_docs,
4 missing_debug_implementations,
5 missing_copy_implementations,
6 trivial_casts,
7 trivial_numeric_casts,
8 unused_extern_crates,
9 unused_import_braces,
10 unused_qualifications,
11 variant_size_differences
12)]
13
14#[macro_use]
15extern crate html5ever;
16
17pub use crate::element_ref::ElementRef;
18pub use crate::html::{Html, HtmlTreeSink};
19pub use crate::node::Node;
20pub use crate::selector::Selector;
21
22pub use selectors::{Element, attr::CaseSensitivity};
23
24pub mod element_ref;
25pub mod error;
26pub mod html;
27pub mod node;
28pub mod selectable;
29pub mod selector;
30
31#[cfg(feature = "atomic")]
32pub(crate) mod tendril_util {
33 use html5ever::tendril;
34 pub type StrTendril = tendril::Tendril<tendril::fmt::UTF8, tendril::Atomic>;
36
37 pub fn make(s: tendril::StrTendril) -> StrTendril {
39 s.into_send().into()
40 }
41}
42
43#[cfg(not(feature = "atomic"))]
44pub(crate) mod tendril_util {
45 use html5ever::tendril;
46 pub type StrTendril = tendril::StrTendril;
48
49 pub fn make(s: StrTendril) -> StrTendril {
51 s
52 }
53}
54
55pub use tendril_util::StrTendril;
56
57#[cfg(test)]
58mod test;