mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-23 01:32:22 -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:
parent
50d32f9151
commit
318e25bd6c
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user