mirror of
https://github.com/mt-mods/mail.git
synced 2025-04-30 08:21:44 -04:00
Simplify interleaving function
Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
This commit is contained in:
parent
e32cc6fa6b
commit
e8d4077c42
1 changed files with 1 additions and 6 deletions
|
@ -4,12 +4,7 @@ local S = minetest.get_translator("mail")
|
|||
local FORMNAME = "mail:message"
|
||||
|
||||
local function interleaveMsg(body)
|
||||
local lines = (body or ""):split("\n", true)
|
||||
local il_lines = {}
|
||||
for _,l in ipairs(lines) do
|
||||
il_lines[#il_lines+1] = "> " .. l
|
||||
end
|
||||
return table.concat(il_lines, "\n")
|
||||
return "> " .. (body or ""):gsub("\n", "\n> ")
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue