mirror of https://github.com/odrling/Aegisub
Add looping support for line templates. Produce multiple whole lines here, instead of multiple copies of each syllable one after another on the same line.
Originally committed to SVN as r1553.
This commit is contained in:
parent
62ded21ece
commit
fda44c93a5
|
@ -443,6 +443,9 @@ function apply_line(meta, styles, subs, line, templates, tenv)
|
|||
-- Apply all line templates
|
||||
aegisub.debug.out(5, "Running line templates\n")
|
||||
for t in matching_templates(templates.line, line, tenv) do
|
||||
tenv.j = 0
|
||||
while tenv.j < t.loops do
|
||||
tenv.j = tenv.j + 1
|
||||
if t.code then
|
||||
aegisub.debug.out(5, "Code template, %s\n", t.code)
|
||||
tenv.line = line
|
||||
|
@ -483,6 +486,7 @@ function apply_line(meta, styles, subs, line, templates, tenv)
|
|||
subs.append(newline)
|
||||
end
|
||||
end
|
||||
end
|
||||
aegisub.debug.out(5, "Done running line templates\n\n")
|
||||
|
||||
-- Loop over syllables
|
||||
|
|
Loading…
Reference in New Issue