aboutsummaryrefslogtreecommitdiffstats
path: root/become-fansubber.lua
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2021-06-15 16:59:50 +0100
committergarret <garret@airmail.cc>2021-06-15 16:59:50 +0100
commitc5e9acf3dc03eec78543f49ba61a3212d6dda477 (patch)
treec4b1b00a94098594320fb9d1d69c6ded04ca73f4 /become-fansubber.lua
parent42a609bb91385285228903a34303d3039c158333 (diff)
downloadaegisub-scripts-c5e9acf3dc03eec78543f49ba61a3212d6dda477.tar.gz
aegisub-scripts-c5e9acf3dc03eec78543f49ba61a3212d6dda477.tar.bz2
aegisub-scripts-c5e9acf3dc03eec78543f49ba61a3212d6dda477.zip
find -> match
does the same thing that i was trying to do, but properly
Diffstat (limited to 'become-fansubber.lua')
-rw-r--r--become-fansubber.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/become-fansubber.lua b/become-fansubber.lua
index 363411a..376a630 100644
--- a/become-fansubber.lua
+++ b/become-fansubber.lua
@@ -1,7 +1,7 @@
script_name="CR Restyler"
script_description="become a fansubber with a click of a button"
script_author = "garret"
-script_version = "2"
+script_version = "2021-06-15"
include("cleantags.lua")
-- Main -> Default
@@ -12,10 +12,10 @@ include("cleantags.lua")
function add_tags(line)
local txt = line.text
local style = line.style
- if style:find("Italics") then
+ if style:match("Italics") then
txt="{\\i1}"..txt
end
- if style:find("Top") then
+ if style:match("Top") then
txt="{\\an8}"..txt
end
line.text = cleantags(txt)
@@ -24,7 +24,7 @@ end
function change_styles(line)
local style = line.style
- if style:find("Top") or style:find("Italics") or style:find("Main") or style:find("Flashback") then
+ if style:match("Top") or style:match("Italics") or style:match("Main") or style:match("Flashback") then
line.style="Default"
end
return line