1
0
의 미러 https://github.com/minetest-mods/digilines.git synced 2025-09-19 05:35:20 +02:00

use text verbatim if it fits on the screen

This commit is contained in:
Peter Nerlich
2020-11-12 10:14:44 +01:00
committed by GitHub
부모 8c1ba6714e
커밋 cb4135a7a7

파일 보기

@@ -34,6 +34,9 @@ local create_lines = function(text)
local line = ""
local line_num = 1
local tab = {}
if #text <= LINE_LENGTH then
line = text
else
for word in string.gmatch(text, "%S+") do
if string.len(line)+string.len(word) < LINE_LENGTH and word ~= "|" then
if line ~= "" then
@@ -54,6 +57,7 @@ local create_lines = function(text)
end
end
end
end
table.insert(tab, line)
return tab
end