mirror of
https://github.com/mt-mods/signs_lib.git
synced 2025-06-30 23:00:27 +02:00
fix empty lines being skipped
This commit is contained in:
2
api.lua
2
api.lua
@ -665,7 +665,7 @@ end
|
|||||||
function signs_lib.split_lines_and_words(text)
|
function signs_lib.split_lines_and_words(text)
|
||||||
if not text then return end
|
if not text then return end
|
||||||
local lines = { }
|
local lines = { }
|
||||||
for _, line in ipairs(text:split("\n")) do
|
for _, line in ipairs(text:split("\n", true)) do
|
||||||
table.insert(lines, line:split(" "))
|
table.insert(lines, line:split(" "))
|
||||||
end
|
end
|
||||||
return lines
|
return lines
|
||||||
|
Reference in New Issue
Block a user