File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -181,12 +181,17 @@ def segment_to_search_range(
181181 )
182182
183183 start_index_for_end_marker = start_match_result .as_index
184- match start_relpos :
185- case RelativeMarker (qualifier = RelativePositionType .AFTER ):
186- start_index_for_end_marker += - 1
187- end_match_result = RangeSpec .from_line_marker (lines , end_relpos , RangeSpec (
188- start_index_for_end_marker , search_range .end , start_match_result .indent
189- ))
184+ search_range_for_end_marker = search_range
185+ if end_relpos .marker_subtype != 'number' :
186+ match start_relpos :
187+ case RelativeMarker (qualifier = RelativePositionType .AFTER ):
188+ start_index_for_end_marker += - 1
189+ search_range_for_end_marker = RangeSpec (
190+ start_index_for_end_marker ,
191+ search_range .end ,
192+ start_match_result .indent
193+ )
194+ end_match_result = RangeSpec .from_line_marker (lines , end_relpos , search_range_for_end_marker )
190195 assert end_match_result , (
191196 f"Unable to find segment end: { end_relpos } ; Try: "
192197 f"1) Using *exactly* the same characters from source; or "
You can’t perform that action at this time.
0 commit comments