diff options
author | Martin Fischer <martin@push-f.com> | 2023-09-01 22:51:38 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2023-09-03 23:00:05 +0200 |
commit | fb3d757b2f756950c9a86681291e2817e4bd2975 (patch) | |
tree | 7f5896f654b8b8138fddbdba9f9c0ec3aafa2e1f /src/machine.rs | |
parent | c040c4fc8091f1b63b63723334b0f1f821e8059f (diff) |
refactor: inline internal method only used once
Diffstat (limited to 'src/machine.rs')
-rw-r--r-- | src/machine.rs | 5 |
1 files changed, 4 insertions, 1 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()) |