From b0c4dd5f66a291abd5c4b6716e8f144d62099c51 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Sun, 29 Jan 2017 10:08:00 -0500 Subject: [PATCH] move red text to lua formatting --- contrib/lua/memeposting.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/lua/memeposting.lua b/contrib/lua/memeposting.lua index 62951be..637ac70 100644 --- a/contrib/lua/memeposting.lua +++ b/contrib/lua/memeposting.lua @@ -25,6 +25,8 @@ function pre_text(str) str = str:gsub("\\", "\") str = str:gsub("/", "/") str = str:gsub("%]", "]") + str = str:gsub("=", "=") + str = str:gsub("@", "@") return span_text("code", str:gsub("%|", "|")) end @@ -33,6 +35,8 @@ function memeposting(body, prefix) body = string.gsub(body, "`(.-)`", pre_text) body = string.gsub(body, "%(%(%((.-)%)%)%)", function(str) return string.format("
%s
", prefix, str) end) 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, "/@(.-)@\\", psy_text) return body