From 311503884d2bde1cc3b0a78ce5e0276a59a5cbd3 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 13 Oct 2017 08:29:27 -0400 Subject: [PATCH] spoilers in lua --- contrib/lua/memeposting.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/lua/memeposting.lua b/contrib/lua/memeposting.lua index 0b90b19..4b08a3d 100644 --- a/contrib/lua/memeposting.lua +++ b/contrib/lua/memeposting.lua @@ -25,6 +25,10 @@ function red_text(str) return string.format("%s", str) end +function spoilers(str) + return string.format("%s", str) +end + function pre_text(str) str = str:gsub("%(", "(") @@ -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