From f044bff0a91c80a6843a01b86b57b9772aebc487 Mon Sep 17 00:00:00 2001 From: UndeadMaelys Date: Tue, 22 Mar 2022 19:56:03 +0100 Subject: [PATCH] remove newline from copy --- R2H2.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R2H2.lua b/R2H2.lua index 5d1a219..cfd0c03 100644 --- a/R2H2.lua +++ b/R2H2.lua @@ -55,7 +55,8 @@ function convertToHeonian(text) local transcribed_text = "" local debug = false - local autocopy = false + local autocopy = false + for _, v in pairs(arg) do if v == "-v" or v == "--verbose" then debug = true end if v == "-c" or v == "--copy" then autocopy = true end @@ -231,7 +232,7 @@ function convertToHeonian(text) end -- output - if autocopy then CopyToClipboard(transcribed_text) end + if autocopy then CopyToClipboard(string.sub(transcribed_text,0,-1)) end return transcribed_text end end \ No newline at end of file