mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +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:
parent
e9087d1be7
commit
5b2461c713
4 changed files with 21 additions and 53 deletions
|
@ -75,7 +75,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 = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue