1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 02:02:16 -05:00

xep2md: fix spaces around links or spans

Don't remember why it did this here. There's another spot where it
removes longer stretches of whitespace. Doesn't trim leading or trailing
whitespace tho, but that's what breaks it here.
This commit is contained in:
Kim Alvefur 2021-04-03 14:19:54 +02:00
parent 50d32f9151
commit 318e25bd6c

View File

@ -225,7 +225,7 @@ end
-- Oh god oh god we're all gonna die! -- Oh god oh god we're all gonna die!
local function escape_text(event) local function escape_text(event)
event.text = event.text:gsub("['&<>\"]", "\\%1"):gsub("^%s+", ""):gsub("%s+$", ""):gsub("%s+", " "); event.text = event.text:gsub("['&<>\"]", "\\%1");
end end
events.add_handler("#text", escape_text, 1000); events.add_handler("#text", escape_text, 1000);