File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -80,8 +80,9 @@ impl PullParser {
8080
8181 Token :: CDataStart if self . depth ( ) > 0 && self . config . c . coalesce_characters && self . config . c . cdata_to_characters => {
8282 if self . buf . is_empty ( ) {
83- self . push_pos ( ) ;
83+ self . push_pos ( ) ; // CDataEnd will pop pos if the buffer remains empty
8484 }
85+ // if coalescing chars, continue without event
8586 self . into_state_continue ( State :: InsideCData )
8687 } ,
8788
@@ -91,6 +92,8 @@ impl PullParser {
9192 let mut next_event = if self . buf_has_data ( ) {
9293 let buf = self . take_buf ( ) ;
9394 if self . inside_whitespace && self . config . c . trim_whitespace {
95+ // there will be no event emitted for this, but start of buffering has pushed a pos
96+ self . next_pos ( ) ;
9497 None
9598 } else if self . inside_whitespace && !self . config . c . whitespace_to_characters {
9699 debug_assert ! ( buf. chars( ) . all( |ch| ch. is_whitespace( ) ) , "ws={buf:?}" ) ;
You can’t perform that action at this time.
0 commit comments