From 9901cd6dde0dd3965ae5c647f6e4d605d56206a9 Mon Sep 17 00:00:00 2001 From: Diego Martinez Date: Mon, 8 Sep 2014 00:46:44 -0300 Subject: [PATCH] Fix word wrapping --- signs_lib/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/signs_lib/init.lua b/signs_lib/init.lua index 55821238..3ea4e017 100644 --- a/signs_lib/init.lua +++ b/signs_lib/init.lua @@ -333,7 +333,7 @@ local function split_lines_and_words(text) if not text then return end local lines = { } for _, line in ipairs(text:split("\n")) do - table.insert(lines, { line }) + table.insert(lines, line:split(" ")) end return lines end @@ -501,7 +501,7 @@ signs_lib.update_sign = function(pos, fields, owner) local ownstr = "" if owner then ownstr = "Locked sign, owned by "..owner.."\n" end - + meta:set_string("infotext", ownstr..make_infotext(fields.text).." ") meta:set_string("text", fields.text) meta:set_int("__signslib_new_format", 1)