Thread:Matt2905/@comment-27996636-20171022135747/@comment-27095448-20171022170458

I split the large text send from params 1 into array of lines (\n is my delimer who mean "new line") local textLines = mw.text.split(frame.args[1], "\n") local maxChars = 0; for each elements in ma array, i'm getting le len of line with #string and i compare it to an number that i stock if len is largest. for key, value in pairs(textLines) do       if #value > maxChars then maxChars = #value end end so i'm getting the len of the largest lines in my array

i'm compare it to the max size set in template, if is largest then i say to template that he need the largest design if maxChars > maxSize then return false else return true end