Skip to content

Commit

Permalink
Fix missing text events in some circumstances
Browse files Browse the repository at this point in the history
Fixed (2):
  async-tokio (1):
    issue774
  issues (1):
    issue774
  • Loading branch information
Mingun authored and dralley committed Jun 29, 2024
1 parent 022441f commit 0534c87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
- `TooLongDecimal`
- `TooLongHexadecimal`
- [#771]: Fixed `Attribute::unescape_value` which does not unescape predefined values since 0.32.0.
- [#774]: Fixed regression since 0.33.0: `Text` event may be skipped in `read_event_into()`
and `read_event_into_async()` in some circumstances.

### Misc Changes

Expand All @@ -42,6 +44,7 @@
[#771]: https://github.com/tafia/quick-xml/pull/771
[#772]: https://github.com/tafia/quick-xml/pull/772
[#773]: https://github.com/tafia/quick-xml/pull/773
[#774]: https://github.com/tafia/quick-xml/issues/774


## 0.34.0 -- 2024-06-25
Expand Down
4 changes: 3 additions & 1 deletion src/reader/buffered_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ macro_rules! impl_buffered_source {
};

match memchr::memchr(b'<', available) {
Some(0) => {
// Special handling is needed only on the first iteration.
// On next iterations we already read something and should emit Text event
Some(0) if read == 0 => {
self $(.$reader)? .consume(1);
*position += 1;
return ReadTextResult::Markup(buf);
Expand Down

0 comments on commit 0534c87

Please sign in to comment.