Archived
1
0

move red text to lua formatting

This commit is contained in:
Jeff Becker 2017-01-29 10:08:00 -05:00
parent 4c6cfefdb5
commit b0c4dd5f66

View File

@ -25,6 +25,8 @@ function pre_text(str)
str = str:gsub("\\", "\") str = str:gsub("\\", "\")
str = str:gsub("/", "/") str = str:gsub("/", "/")
str = str:gsub("%]", "]") str = str:gsub("%]", "]")
str = str:gsub("=", "=")
str = str:gsub("@", "@")
return span_text("code", str:gsub("%|", "|")) return span_text("code", str:gsub("%|", "|"))
end end
@ -33,6 +35,8 @@ function memeposting(body, prefix)
body = string.gsub(body, "`(.-)`", pre_text) body = string.gsub(body, "`(.-)`", pre_text)
body = string.gsub(body, "%(%(%((.-)%)%)%)", function(str) return string.format("<div class='nazi' style='background-image: url(%sstatic/nazi.png);'>%s</div>", prefix, str) end) body = string.gsub(body, "%(%(%((.-)%)%)%)", function(str) return string.format("<div class='nazi' style='background-image: url(%sstatic/nazi.png);'>%s</div>", prefix, str) end)
body = string.gsub(body, "|(.-)|", wobble_text) body = string.gsub(body, "|(.-)|", wobble_text)
body = string.gsub(body, "==(.-)==", red_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)
return body return body