Browse Source

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.
master
Kim Alvefur 2 years ago
parent
commit
318e25bd6c
  1. 2
      tools/xep2md.lua

2
tools/xep2md.lua

@ -225,7 +225,7 @@ end @@ -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");
end
events.add_handler("#text", escape_text, 1000);

Loading…
Cancel
Save