@@ -88,7 +88,7 @@ def add_transform(
8888 if not source_is_new or not target_is_new :
8989 return
9090
91- transform_type = self .mismatch_animation
91+ transform_type = self .mismatch_animation
9292 if source .has_same_shape_as (target ):
9393 transform_type = self .match_animation
9494
@@ -154,16 +154,16 @@ def matching_blocks(
154154 counts2 = list (map (target .substr_to_path_count , syms2 ))
155155
156156 # Start with user specified matches
157- blocks = [(source [key ], target [key ]) for key in matched_keys ]
158- blocks += [(source [key1 ], target [key2 ]) for key1 , key2 in key_map . items () ]
157+ blocks = [(source [key1 ], target [key2 ]) for key1 , key2 in key_map . items () ]
158+ blocks += [(source [key ], target [key ]) for key in matched_keys ]
159159
160160 # Nullify any intersections with those matches in the two symbol lists
161161 for sub_source , sub_target in blocks :
162162 for i in range (len (syms1 )):
163- if source [i ] in sub_source .family_members_with_points ():
163+ if i < len ( source ) and source [i ] in sub_source .family_members_with_points ():
164164 syms1 [i ] = "Null1"
165165 for j in range (len (syms2 )):
166- if target [j ] in sub_target .family_members_with_points ():
166+ if j < len ( target ) and target [j ] in sub_target .family_members_with_points ():
167167 syms2 [j ] = "Null2"
168168
169169 # Group together longest matching substrings
0 commit comments