mirror of
https://github.com/mt-mods/signs_lib.git
synced 2024-11-09 11:20:19 +01:00
Convert CR(LF)s to LFs (#32)
This commit is contained in:
parent
4309b3575a
commit
87d65439a1
3
api.lua
3
api.lua
|
@ -818,6 +818,9 @@ function signs_lib.update_sign(pos, fields)
|
|||
local ownstr = ""
|
||||
if owner ~= "" then ownstr = S("Locked sign, owned by @1\n", owner) end
|
||||
|
||||
-- Fix pasting from Windows: CR instead of LF
|
||||
text = string.gsub(text, "\r\n?", "\n")
|
||||
|
||||
meta:set_string("text", text)
|
||||
meta:set_string("infotext", ownstr..make_infotext(text).." ")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user