html: Do not export Node in the public API
It is not usable on its own and it is not in the output of any public method.
This commit is contained in:
parent
221e9c055c
commit
d36f485b19
@ -1,5 +1,10 @@
|
||||
# [unreleased]
|
||||
|
||||
Breaking Changes:
|
||||
|
||||
- Do not export `Node` in the public API, it is not usable on its own and it is
|
||||
not in the output of any public method.
|
||||
|
||||
Improvements:
|
||||
|
||||
- Add support for deprecated HTML tags, according to Matrix 1.10
|
||||
|
@ -297,7 +297,7 @@ impl fmt::Display for Html {
|
||||
/// An HTML node.
|
||||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
pub struct Node {
|
||||
pub(crate) struct Node {
|
||||
pub(crate) parent: Option<usize>,
|
||||
pub(crate) prev_sibling: Option<usize>,
|
||||
pub(crate) next_sibling: Option<usize>,
|
||||
@ -320,7 +320,7 @@ impl Node {
|
||||
}
|
||||
|
||||
/// Returns the data of this `Node` if it is an Element (aka an HTML tag).
|
||||
pub fn as_element(&self) -> Option<&ElementData> {
|
||||
pub(crate) fn as_element(&self) -> Option<&ElementData> {
|
||||
as_variant!(&self.data, NodeData::Element)
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,6 @@ mod sanitizer_config;
|
||||
|
||||
pub use self::{
|
||||
helpers::*,
|
||||
html::{ElementData, Html, Node},
|
||||
html::{ElementData, Html},
|
||||
sanitizer_config::SanitizerConfig,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user