diff options
Diffstat (limited to 'src/emitter.rs')
-rw-r--r-- | src/emitter.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/emitter.rs b/src/emitter.rs index d28b11b..9334121 100644 --- a/src/emitter.rs +++ b/src/emitter.rs @@ -89,7 +89,7 @@ pub trait Emitter<O> { /// /// If the current token is an end tag, the emitter should emit the /// [`Error::EndTagWithTrailingSolidus`] error. - fn set_self_closing(&mut self, offset: O); + fn set_self_closing(&mut self, slash_offset: O); /// Assuming the _current token_ is a doctype, set its "force quirks" flag to true. /// @@ -329,7 +329,7 @@ impl<O: Offset> Emitter<O> for DefaultEmitter<O> { self.emit_token(Token::Doctype(doctype)); } - fn set_self_closing(&mut self, offset: O) { + fn set_self_closing(&mut self, slash_offset: O) { let tag = self.current_token.as_mut().unwrap(); match tag { Token::StartTag(StartTag { @@ -339,7 +339,10 @@ impl<O: Offset> Emitter<O> for DefaultEmitter<O> { *self_closing = true; } Token::EndTag(_) => { - self.emit_error(Error::EndTagWithTrailingSolidus, offset - 1..offset); + self.emit_error( + Error::EndTagWithTrailingSolidus, + slash_offset..slash_offset + 1, + ); } _ => { debug_assert!(false); |