From a123e01ef8a91540e9d3c12e12571447224516dc Mon Sep 17 00:00:00 2001 From: garret Date: Sun, 13 Jun 2021 15:08:28 +0100 Subject: make it work with adding 2 tags at same time --- become-fansubber.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'become-fansubber.lua') 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 -- cgit v1.2.3-70-g09d2