You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
textStuff = textStuff or {}
local TextFormatter = require("TheTwoTowers.ftext").TextFormatter
myFormatter = TextFormatter:new( {
width = 72,
textColor = "<firebrick>",
alignment = "left",
})
function textStuff.formatIt(string)
cecho(myFormatter:format(string))
end
with this, if I pass a string to textStuff.formatIt() longer than the 72 column word wrap point that also has a \n in the string after that point, it locks mudlet up and I have to kill the process
The text was updated successfully, but these errors were encountered:
kalrykh
changed the title
new line being passed to textFormatter after the point of word wrap seems to be hard locking mullet
new line being passed to textFormatter after the point of word wrap seems to be hard locking mudlet
Dec 31, 2022
also, workaround, stripping the string of new lines before it gets passed to the function and then adding one back after TextFormatter formats it gets me what I need.
w = utf8.gsub(w,'%\n','')
textStuff.formatIt(w)
cecho("\n")
with this, if I pass a string to textStuff.formatIt() longer than the 72 column word wrap point that also has a \n in the string after that point, it locks mudlet up and I have to kill the process
The text was updated successfully, but these errors were encountered: