Skip to content

Commit dec36d9

Browse files
committed
Add note about Atom and ns! usage
1 parent 1f8c0ae commit dec36d9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

markup5ever/interface/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ pub mod tree_builder;
122122
/// |
123123
/// prefix (when resolved gives namespace_url `https://furniture.rs`)
124124
/// ```
125+
///
126+
/// NOTE: `Prefix`, `LocalName` and `Prefix` are all derivative of
127+
/// `string_cache::atom::Atom` and `Atom` implements `Deref<str>`.
128+
///
125129
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Clone)]
126130
#[cfg_attr(feature = "heap_size", derive(HeapSizeOf))]
127131
pub struct QualName {
@@ -162,7 +166,9 @@ pub struct QualName {
162166
/// # }
163167
/// ```
164168
///
165-
/// When matching namespaces used by HTML we can use `ns!` macro:
169+
/// When matching namespaces used by HTML we can use `ns!` macro.
170+
/// Although keep in mind that ns! macro only works with namespaces
171+
/// that are present in HTML spec (like `html`, `xmlns`, `svg`, etc.).
166172
///
167173
/// ```
168174
/// #[macro_use] extern crate markup5ever;

0 commit comments

Comments
 (0)