@@ -710,10 +710,13 @@ fn process_event(event: &Event, mut state: &mut State) -> Step {
710
710
if !allow_iteration ( & table. columns [ i] , & state. settings ) { return Step :: Next ; }
711
711
if let Some ( "last" ) = table. columns [ i] . aggr { table. columns [ i] . value . borrow_mut ( ) . clear ( ) ; }
712
712
}
713
- table. columns [ i] . value . borrow_mut ( ) . push_str ( value)
713
+ if i == 0 { table. lastid . borrow_mut ( ) . push_str ( value) ; }
714
+ if let ( Some ( s) , Some ( r) ) = ( table. columns [ i] . find , table. columns [ i] . replace ) {
715
+ table. columns [ i] . value . borrow_mut ( ) . push_str ( & value. replace ( s, r) ) ;
716
+ }
717
+ else { table. columns [ i] . value . borrow_mut ( ) . push_str ( value) ; }
714
718
}
715
719
else if !state. settings . hush_warning { eprintln ! ( "Warning: failed to decode attribute {} for column {}" , request, table. columns[ i] . name) ; }
716
- return Step :: Next ;
717
720
}
718
721
}
719
722
else if !state. settings . hush_warning { eprintln ! ( "Warning: failed to decode an attribute for column {}" , table. columns[ i] . name) ; }
@@ -723,10 +726,7 @@ fn process_event(event: &Event, mut state: &mut State) -> Step {
723
726
if table. columns [ i] . value . borrow ( ) . is_empty ( ) && !state. settings . hush_warning {
724
727
eprintln ! ( "Warning: column {} requested attribute {} not found" , table. columns[ i] . name, request) ;
725
728
}
726
- if let ( Some ( s) , Some ( r) ) = ( table. columns [ i] . find , table. columns [ i] . replace ) {
727
- let mut value = table. columns [ i] . value . borrow_mut ( ) ;
728
- * value = value. replace ( s, r) ;
729
- }
729
+ return Step :: Next ;
730
730
}
731
731
// Set the appropriate convert flag for the following data in case the 'conv' option is present
732
732
match table. columns [ i] . convert {
0 commit comments