aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2021-06-13 15:08:28 +0100
committergarret <garret@airmail.cc>2021-06-13 15:08:28 +0100
commita123e01ef8a91540e9d3c12e12571447224516dc (patch)
tree8b7bca7bca21e38c757e13509b7d2584d60ac403
parente41d6199d66e7cb7f2faf52989de30c327c07b8a (diff)
downloadaegisub-scripts-a123e01ef8a91540e9d3c12e12571447224516dc.tar.gz
aegisub-scripts-a123e01ef8a91540e9d3c12e12571447224516dc.tar.bz2
aegisub-scripts-a123e01ef8a91540e9d3c12e12571447224516dc.zip
make it work with adding 2 tags at same time
-rw-r--r--become-fansubber.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/become-fansubber.lua b/become-fansubber.lua
index dc2111d..363411a 100644
--- a/become-fansubber.lua
+++ b/become-fansubber.lua
@@ -1,8 +1,9 @@
script_name="CR Restyler"
script_description="become a fansubber with a click of a button"
script_author = "garret"
-script_version = "1"
+script_version = "2"
+include("cleantags.lua")
-- Main -> Default
-- Top -> an8
-- italics -> i1
@@ -11,12 +12,13 @@ script_version = "1"
function add_tags(line)
local txt = line.text
local style = line.style
- if style:find("Top") then
- line.text="{\\an8}"..txt
- end
if style:find("Italics") then
- line.text="{\\i1}"..txt
+ txt="{\\i1}"..txt
+ end
+ if style:find("Top") then
+ txt="{\\an8}"..txt
end
+ line.text = cleantags(txt)
return line
end