cdown/srt

srt.compose should not in-place modify Subtitle objects

Closed this issue · 1 comments

cdown commented

Currently this happens since we reindex and directly replace inside the Subtitle object. This seems quite unexpected by default, so we should check for changes and create a new Subtitle object, and only do the current behaviour if in_place=True.

cdown commented

This also blocks writing SRTParseError attribute tests (as in 6a6e07b) for non-end contiguous checks because subs[0] gets modified when .compose() is called.