[karaoke-split] trim whitespaces around split marker
This commit is contained in:
parent
b56b46cde9
commit
0cd3b823d7
|
@ -24,7 +24,8 @@ function split_line(subs, sel)
|
|||
line1 = subs[i]
|
||||
line2 = subs[i]
|
||||
|
||||
line1.text, line2.text = line1.text:match("(.-){split}(.*)")
|
||||
split_expr = "(.-)%s*{split}%s*(.*)"
|
||||
line1.text, line2.text = line1.text:match(split_expr)
|
||||
|
||||
while line1.text ~= nil do
|
||||
line1.end_time = line1.start_time + getduration(line1.text)
|
||||
|
@ -36,7 +37,7 @@ function split_line(subs, sel)
|
|||
subs.insert(i, line2)
|
||||
line1 = subs[i]
|
||||
|
||||
line1.text, line2.text = line1.text:match("(.-){split}(.*)")
|
||||
line1.text, line2.text = line1.text:match(split_expr)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue