1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-27 03:32:16 -05:00

Merge pull request #1048 from Zash/markdownspacefix

xep2md: fix spaces around links or spans
This commit is contained in:
Jonas Schäfer 2021-04-06 16:35:15 +02:00 committed by GitHub
commit 812ab80047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);