Skip to content

Commit

Permalink
remove special char from extralinetext key
Browse files Browse the repository at this point in the history
  • Loading branch information
Neogeekmo committed May 4, 2024
1 parent 0af00a1 commit 6f97695
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions helper/Utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ function AprRC:GetItemIDFromLink(link)
end

function AprRC:ExtraLineTextToKey(inputString)
local result = string.gsub(inputString, "%s", "_")
result = string.gsub(result, "_a_", "_")
result = string.gsub(result, "_of_", "_")
result = string.gsub(result, "_the_", "_")
result = string.gsub(result, "__", "_")
result = string.gsub(result, "'", "")
local result = string.gsub(inputString, "_(a|of|the)_", " ")
result = string.gsub(result, " - ", " ")
result = string.gsub(result, "-", " ")
result = string.gsub(result, "[+='\"`$£€°~^¨<>|#&;,%.:§?!*/(){}%[%]]", "")
result = string.gsub(result, "%s", "_")
result = string.gsub(result, "__+", "_")
result = string.gsub(result, "_+$", "")
result = string.upper(result)

return result
Expand Down

0 comments on commit 6f97695

Please sign in to comment.