Fix --clean only cleaning last expression
This commit is contained in:
parent
96c0343adc
commit
e51110847e
|
@ -241,9 +241,7 @@ class SubripFile:
|
|||
|
||||
# Remove lines matching any expression
|
||||
for regexp in expressions:
|
||||
subs = filter(lambda sub: not sub.matches(regexp), self.subs)
|
||||
|
||||
self.subs = list(subs)
|
||||
self.subs = [sub for sub in self.subs if not sub.matches(regexp)]
|
||||
|
||||
def shift(self, ms):
|
||||
for sub in self.subs:
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
Even <a>
|
||||
whether the tag
|
||||
|
|
|
@ -4,16 +4,10 @@ This one is full of HTML tags.
|
|||
Above, below, everywhere
|
||||
|
||||
2
|
||||
01:00:53,500 --> 01:00:55,200
|
||||
The script should not
|
||||
care whether the tag is
|
||||
valid or not
|
||||
|
||||
3
|
||||
01:00:56,000 --> 01:00:57,000
|
||||
It should just strip all of
|
||||
them mercilessly
|
||||
|
||||
4
|
||||
3
|
||||
01:00:58,100 --> 01:00:59,600
|
||||
Including this one!
|
||||
|
|
|
@ -4,16 +4,10 @@ This one is full of HTML tags.
|
|||
Above, below, everywhere
|
||||
|
||||
2
|
||||
00:00:53,500 --> 00:00:55,200
|
||||
The script should not
|
||||
care whether the tag is
|
||||
valid or not
|
||||
|
||||
3
|
||||
00:00:56,000 --> 00:00:57,000
|
||||
It should just strip all of
|
||||
them mercilessly
|
||||
|
||||
4
|
||||
3
|
||||
00:00:58,100 --> 00:00:59,600
|
||||
Including this one!
|
||||
|
|
|
@ -4,16 +4,10 @@
|
|||
<i>Above, below, everywhere</i>
|
||||
|
||||
2
|
||||
00:00:53,500 --> 00:00:55,200
|
||||
<html>The script should not
|
||||
care whether the tag is
|
||||
valid or not</html>
|
||||
|
||||
3
|
||||
00:00:56,000 --> 00:00:57,000
|
||||
<p>It should just strip all of
|
||||
them mercilessly</p>
|
||||
|
||||
4
|
||||
3
|
||||
00:00:58,100 --> 00:00:59,600
|
||||
<ul>Including this one!</ul>
|
||||
|
|
Loading…
Reference in New Issue