spoilers in lua
This commit is contained in:
parent
8df0d9bbc2
commit
311503884d
@ -25,6 +25,10 @@ function red_text(str)
|
|||||||
return string.format("<span class='redtext'>%s</span>", str)
|
return string.format("<span class='redtext'>%s</span>", str)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function spoilers(str)
|
||||||
|
return string.format("<span class='spoiler'>%s</span>", str)
|
||||||
|
end
|
||||||
|
|
||||||
function pre_text(str)
|
function pre_text(str)
|
||||||
|
|
||||||
str = str:gsub("%(", "(")
|
str = str:gsub("%(", "(")
|
||||||
@ -48,5 +52,6 @@ function memeposting(body, prefix)
|
|||||||
body = string.gsub(body, "@@(.-)@@", psy_text)
|
body = string.gsub(body, "@@(.-)@@", psy_text)
|
||||||
body = string.gsub(body, "//(.-)\\\\", explode_text)
|
body = string.gsub(body, "//(.-)\\\\", explode_text)
|
||||||
body = string.gsub(body, "/@(.-)@\\", psy_text)
|
body = string.gsub(body, "/@(.-)@\\", psy_text)
|
||||||
|
body = string.gsub(body, "%*%*(.-)%*%*", spoilers)
|
||||||
return body
|
return body
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user