Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sinedie/SRTranslator
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedie committed May 5, 2023
2 parents 5fcd12a + 10a9ed4 commit c85c18c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions srtranslator/srt_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def _clean_subs_content(self, subtitles: List[Subtitle]) -> List[Subtitle]:
sub.content = srt.make_legal_content(sub.content)
sub.content = sub.content.strip()

if sub.content == "":
sub.content = "..."

if all(sentence.startswith("-") for sentence in sub.content.split("\n")):
sub.content = sub.content.replace("\n", "_")
continue
Expand Down

0 comments on commit c85c18c

Please sign in to comment.