Archived
1
0

spoilers in lua

This commit is contained in:
Jeff Becker 2017-10-13 08:29:27 -04:00
parent 8df0d9bbc2
commit 311503884d
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

View File

@ -25,6 +25,10 @@ function red_text(str)
return string.format("<span class='redtext'>%s</span>", str)
end
function spoilers(str)
return string.format("<span class='spoiler'>%s</span>", str)
end
function pre_text(str)
str = str:gsub("%(", "&#40;")
@ -48,5 +52,6 @@ function memeposting(body, prefix)
body = string.gsub(body, "@@(.-)@@", psy_text)
body = string.gsub(body, "//(.-)\\\\", explode_text)
body = string.gsub(body, "/@(.-)@\\", psy_text)
body = string.gsub(body, "%*%*(.-)%*%*", spoilers)
return body
end