Skip to content

Commit

Permalink
fix(linker): be more lenient with span alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
nsantacruz committed Nov 2, 2023
1 parent 6f2e424 commit 6d9e834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sefaria/model/linker/ref_part.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def map_new_indices(self, new_doc: Doc, new_indices: Tuple[int, int]) -> None:
"""
Remap self.span to new indices
"""
self.span = new_doc.char_span(*new_indices)
self.span = new_doc.char_span(*new_indices, alignment_mode='expand')
if self.span is None: raise InputError(f"${new_indices} don't match token boundaries. Using 'expand' alignment mode text is '{new_doc.char_span(*new_indices, alignment_mode='expand')}'")

@property
Expand Down

0 comments on commit 6d9e834

Please sign in to comment.