aboutsummaryrefslogtreecommitdiff
path: root/src/machine.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/machine.rs')
-rw-r--r--src/machine.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/machine.rs b/src/machine.rs
index deb3983..a58a754 100644
--- a/src/machine.rs
+++ b/src/machine.rs
@@ -694,7 +694,7 @@ where
Ok(ControlToken::Continue)
}
Some(x) => {
- slf.emitter.init_attribute_name(slf.reader.position());
+ slf.emitter.init_attribute_name(slf.reader.position() - 1);
slf.state = State::AttributeName;
slf.unread_char(Some(x));
Ok(ControlToken::Continue)
@@ -747,7 +747,7 @@ where
Ok(ControlToken::Eof)
}
Some(x) => {
- slf.emitter.init_attribute_name(slf.reader.position());
+ slf.emitter.init_attribute_name(slf.reader.position() - 1);
slf.state = State::AttributeName;
slf.unread_char(Some(x));
Ok(ControlToken::Continue)
@@ -775,7 +775,7 @@ where
}
c => {
slf.emitter
- .init_attribute_value(slf.reader.position(), false);
+ .init_attribute_value(slf.reader.position() - 1, false);
slf.state = State::AttributeValueUnquoted;
slf.unread_char(c);
Ok(ControlToken::Continue)
@@ -952,7 +952,7 @@ where
}
c => {
slf.emit_error(Error::IncorrectlyOpenedComment);
- slf.emitter.init_comment(slf.reader.position());
+ slf.emitter.init_comment(slf.reader.position() - 1);
slf.state = State::BogusComment;
slf.unread_char(c);
Ok(ControlToken::Continue)