1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix core.wrap_text and make its behaviour consistent with the docs

Code based on initial implementation by @dsohler.
This commit is contained in:
sfan5 2017-09-11 16:25:20 +02:00
parent 17fd5fe935
commit 6fa2f6b4aa
4 changed files with 21 additions and 53 deletions

View file

@ -66,7 +66,7 @@ local function get_formspec(tabview, name, tabdata)
if error == nil then
local descriptiontext = descriptionfile:read("*all")
descriptionlines = core.wrap_text(descriptiontext, 42)
descriptionlines = core.wrap_text(descriptiontext, 42, true)
descriptionfile:close()
else
descriptionlines = {}