aboutsummaryrefslogtreecommitdiff
path: root/src/emitter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/emitter.rs')
-rw-r--r--src/emitter.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/emitter.rs b/src/emitter.rs
index d3258e2..8856589 100644
--- a/src/emitter.rs
+++ b/src/emitter.rs
@@ -1,5 +1,4 @@
use std::collections::btree_map::Entry;
-use std::collections::BTreeMap;
use std::collections::BTreeSet;
use std::collections::VecDeque;
use std::mem;
@@ -179,7 +178,7 @@ pub trait Emitter<O> {
pub struct DefaultEmitter<O = NoopOffset> {
current_characters: String,
current_token: Option<Token<O>>,
- current_attribute: Option<(String, crate::attr::Attribute<O>)>,
+ current_attribute: Option<(String, crate::attr::AttrInternal<O>)>,
seen_attributes: BTreeSet<String>,
emitted_tokens: VecDeque<Token<O>>,
attr_in_end_tag_span: Option<Range<O>>,
@@ -210,7 +209,7 @@ impl<O> DefaultEmitter<O> {
{
if let Some((k, v)) = self.current_attribute.take() {
match self.current_token {
- Some(Token::StartTag(ref mut tag)) => match tag.attributes.entry(k) {
+ Some(Token::StartTag(ref mut tag)) => match tag.attributes.inner.entry(k) {
Entry::Vacant(vacant) => {
vacant.insert(v);
}
@@ -380,7 +379,7 @@ impl<O: Offset> Emitter<O> for DefaultEmitter<O> {
self.flush_current_attribute();
self.current_attribute = Some((
String::new(),
- crate::attr::Attribute {
+ crate::attr::AttrInternal {
name_span: offset..offset,
value: String::new(),
value_span: Range::default(),
@@ -461,7 +460,7 @@ pub struct StartTag<O> {
///
/// Duplicate attributes are ignored after the first one as per WHATWG spec. Implement your own
/// [`Emitter`] to tweak this behavior.
- pub attributes: BTreeMap<String, crate::attr::Attribute<O>>,
+ pub attributes: crate::attr::AttributeMap<O>,
/// The source code span of the tag.
pub span: Range<O>,