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.
Kim Alvefur 2021-04-03 14:19:54 +02:00
parent 50d32f9151
commit 318e25bd6c
1 changed files with 1 additions and 1 deletions

View File

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