Skip to content

Commit

Permalink
Remove re.ASCII flag from SRT_REGEX
Browse files Browse the repository at this point in the history
This buys us very little now that we also check for a timestamp, so it should
be extremely hard to match.
  • Loading branch information
cdown committed Dec 20, 2015
1 parent a05f97e commit be2d19b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions srt.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
# next lines look like an index and a timestamp as a best-effort
# solution to work around these.
r'(?=(?:\d+\n\d+:|\Z))',
# Python 3 searches for Unicode by default. The SRT spec doesn't allow for
# this in indices or timestamps, so we limit \d to search for [0-9] only by
# using re.ASCII if necessary.
re.MULTILINE | re.DOTALL | getattr(re, 'ASCII', 0),
re.MULTILINE | re.DOTALL,
)

SECONDS_IN_HOUR = 3600
Expand Down

0 comments on commit be2d19b

Please sign in to comment.