Created
October 29, 2012 15:16
-
-
Save torque/3974121 to your computer and use it in GitHub Desktop.
YEP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function HURR(sub,sel,act) | |
for x = 1,#sub do | |
local line = sub[x] | |
if line.class == "dialogue" then | |
if line.text:match("^{.-\\i1.-}") and line.text:match("{.-\\i0?.-}$") then | |
line.text = line.text:gsub("{\\i[01]?}","") | |
line.text = line.text:gsub("^({.-)\\i1(.-})","%1%2") | |
line.text = line.text:gsub("({.-)\\i0?(.-})$","%1%2") | |
line.style = line.style.." italic" | |
sub[x] = line | |
end | |
end | |
end | |
end | |
aegisub.register_macro("Strip Italics","HURR DURR", HURR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment