diff options
Diffstat (limited to 'src/emitter.rs')
-rw-r--r-- | src/emitter.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emitter.rs b/src/emitter.rs index 9334121..ff6e863 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -275,7 +275,7 @@ impl<O: Offset> Emitter<O> for DefaultEmitter<O> { fn init_start_tag(&mut self, offset: O) { self.current_token = Some(Token::StartTag(StartTag { - span: offset - b"<".len()..offset - b"<".len(), + span: offset..O::default(), self_closing: false, name: String::new(), attributes: Default::default(), @@ -283,7 +283,7 @@ impl<O: Offset> Emitter<O> for DefaultEmitter<O> { } fn init_end_tag(&mut self, offset: O) { self.current_token = Some(Token::EndTag(EndTag { - span: offset - b"</".len()..offset - b"</".len(), + span: offset..O::default(), name: String::new(), })); self.seen_attributes.clear(); @@ -305,10 +305,10 @@ impl<O: Offset> Emitter<O> for DefaultEmitter<O> { self.push_error(Error::EndTagWithAttributes, span); } self.seen_attributes.clear(); - tag.span.end = offset + b">".len(); + tag.span.end = offset; } Token::StartTag(tag) => { - tag.span.end = offset + b">".len(); + tag.span.end = offset; } _ => debug_assert!(false), } |