aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/machine.rs5
-rw-r--r--src/tokenizer.rs6
2 files changed, 4 insertions, 7 deletions
diff --git a/src/machine.rs b/src/machine.rs
index b23e5f2..f7f5ac6 100644
--- a/src/machine.rs
+++ b/src/machine.rs
@@ -1695,7 +1695,10 @@ where
slf.temporary_buffer.push(x);
slf.temporary_buffer.push_str(char_ref.name);
let char_ref_name_last_character = char_ref.name.chars().last();
- let next_character = slf.next_input_character()?;
+
+ let next_character = slf.read_char()?;
+ slf.unread_char(next_character);
+
if slf.is_consumed_as_part_of_an_attribute()
&& char_ref_name_last_character != Some(';')
&& matches!(next_character, Some(x) if x == '=' || x.is_ascii_alphanumeric())
diff --git a/src/tokenizer.rs b/src/tokenizer.rs
index 83c3965..d59710d 100644
--- a/src/tokenizer.rs
+++ b/src/tokenizer.rs
@@ -343,12 +343,6 @@ impl<R: Reader + Position<O>, O: Offset, E: Emitter<O>> Tokenizer<R, O, E> {
}
}
- pub(crate) fn next_input_character(&mut self) -> Result<Option<char>, R::Error> {
- let rv = self.read_char()?;
- self.unread_char(rv);
- Ok(rv)
- }
-
pub(crate) fn flush_buffer_characters(&mut self) {
self.emitter.emit_string(&self.temporary_buffer);
self.temporary_buffer.clear();