Lyqyd, on 20 August 2016 - 07:28 PM, said:
Uhh,
Yeah, that's waaay too complicated.
local max = 0 for match in string.gmatch(fileContents, "%](=*)%]" do max = math.max(max, #match) end local quotedContents = "["..string.rep("=", max + 1).."["..fileContents.."]"..string.rep("=", max + 1).."]"
Yeah, that's waaay too complicated.
I asked someone who has a function to serialize something without the formatting if he has any problems with releasing it.