Archived
1
0

try escaping pipe

This commit is contained in:
Jeff Becker 2017-01-29 09:46:12 -05:00
parent 3f6c6ed615
commit 749e1fc069

View File

@ -17,12 +17,16 @@ function psy_text(str)
return span_text("psy", str)
end
function pre_text(str)
return span_text("code", str:gsub("%|", "|"))
end
-- generate extra markup
function memeposting(body, prefix)
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, "%[%[%[(.-)%]%]%]", wobble_text)
body = string.gsub(body, "|(.-)|", wobble_text)
body = string.gsub(body, "//(.-)\\\\", explode_text)
body = string.gsub(body, "/@(.-)@\\", psy_text)
body = string.gsub(body, "`(.-)`", pre_text)
return body
end