mirror of
https://github.com/pyrollo/display_modpack.git
synced 2025-10-16 09:05:22 +02:00
Convert CR(LF)s to LFs (#19)
This commit is contained in:
@@ -28,6 +28,8 @@ local FS = function(...) return minetest.formspec_escape(S(...)) end
|
||||
|
||||
function signs_api.set_display_text(pos, text, font)
|
||||
local meta = minetest.get_meta(pos)
|
||||
-- Fix pasting from Windows: CR instead of LF
|
||||
text = string.gsub(text, "\r\n?", "\n")
|
||||
meta:set_string("display_text", text)
|
||||
if text and text ~= "" then
|
||||
meta:set_string("infotext", "\""..text.."\"")
|
||||
|
Reference in New Issue
Block a user