mirror of
https://github.com/mt-mods/signs_lib.git
synced 2025-01-25 23:00:21 +01:00
fix empty lines being skipped
This commit is contained in:
parent
d41e2ffd73
commit
e4336e320c
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
|
||||||
|
Loading…
Reference in New Issue
Block a user