diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/emitter.rs | 7 | ||||
-rw-r--r-- | src/lib.rs | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/emitter.rs b/src/emitter.rs index dee0aa0..b75334a 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -158,13 +158,14 @@ pub trait Emitter<O> { fn push_doctype_system_id(&mut self, s: &str); } -/// The DefaultEmitter is not exposed in the public API because: +/// The default implementation of [`Emitter`], used to produce tokens. +/// +/// # Warning /// /// * Using the DefaultEmitter without calling [`Tokenizer::set_state`] /// results in wrong state transitions: /// -#[cfg_attr(not(feature = "integration-tests"), doc = "```ignore")] -#[cfg_attr(feature = "integration-tests", doc = "```")] +/// ``` /// # use html5tokenizer::{DefaultEmitter, Event, Tokenizer, Token}; /// let emitter = DefaultEmitter::default(); /// let html = "<script><b>"; @@ -17,7 +17,7 @@ pub mod reader; mod tokenizer; mod utils; -pub use emitter::{Comment, Doctype, Emitter, EndTag, StartTag, Token}; +pub use emitter::{Comment, DefaultEmitter, Doctype, Emitter, EndTag, StartTag, Token}; pub use error::Error; pub use naive_parser::NaiveParser; pub use tokenizer::{CdataAction, Event, State, Tokenizer}; @@ -25,9 +25,6 @@ pub use tokenizer::{CdataAction, Event, State, Tokenizer}; #[cfg(feature = "integration-tests")] pub use utils::State as InternalState; -#[cfg(feature = "integration-tests")] -pub use emitter::DefaultEmitter; - /// Relative links in the README.md don't work in rustdoc, so we have to override them. macro_rules! file_url { ($path:literal) => { |