add {{NoLineBreak}} tag

This commit is contained in:
Buurazu authored and Wofsauge committed 2024-06-03 18:39:47 +02:00
1 parent f5cc7b1501
commit 492486fc07
1 file changed
+6
+6
View File
@@ -983,6 +983,12 @@ end
-- returns the string as a table of lines
function EID:fitTextToWidth(str, textboxWidth, breakUtf8Chars)
local formattedLines = {}
-- Lines with a {{NoLineBreak}} tag should be left in one continuous line
if str:find("{{NoLineBreak}}") then
str = str:gsub("{{NoLineBreak}}","")
table.insert(formattedLines,str)
return formattedLines
end
local curLength = 0
local text = {}
-- the first word we run into might actually be a bulletpoint icon, which should be zero width