aboutsummaryrefslogtreecommitdiff
path: root/src/machine.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2023-09-01 13:27:46 +0200
committerMartin Fischer <martin@push-f.com>2023-09-03 23:00:05 +0200
commit6556106154d7e7cbc7820f223b9baaf49a900449 (patch)
tree1778db5ce2665aa49afb68041f53b6ee07149916 /src/machine.rs
parent0581e619867bde2374376265b24169b404187529 (diff)
fix!: make set_self_closing encoding-independent
Diffstat (limited to 'src/machine.rs')
-rw-r--r--src/machine.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/machine.rs b/src/machine.rs
index 4f2d129..5c5c533 100644
--- a/src/machine.rs
+++ b/src/machine.rs
@@ -929,7 +929,8 @@ where
State::SelfClosingStartTag => match slf.read_char()? {
Some('>') => {
slf.emitter.set_self_closing(
- slf.position_before_match - slf.reader.len_of_char_in_current_encoding('/'),
+ slf.position_before_match - slf.reader.len_of_char_in_current_encoding('/')
+ ..slf.position_before_match,
);
slf.state = State::Data;
slf.emit_current_tag();