File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 134134--============================================================]]
135135
136136local InputField = {
137- _VERSION = " InputField 3.3.0" ,
137+ _VERSION = " InputField 3.3.0-dev " ,
138138}
139139
140140
@@ -225,14 +225,17 @@ end
225225
226226
227227local function cleanString (field , s )
228- s = s :gsub ((field :isMultiline () and " [%z\1 -\9\11 -\31 ]+" or " [%z\1 -\31 ]+" ), " " ) -- Should we allow horizontal tab?
228+ local isMultiline = field :isMultiline ()
229+ s = s :gsub ((isMultiline and " [%z\1 -\9\11 -\31 ]+" or " [%z\1 -\31 ]+" ), " " ) -- Should we allow horizontal tab?
229230
230231 if field .fontFilteringIsActive then
231232 local font = field .font
232233 local hasGlyphs = font .hasGlyphs
233234
234235 s = s :gsub (utf8.charpattern , function (c )
235- if not hasGlyphs (font , c ) then return " " end
236+ if not (hasGlyphs (font , c ) or (c == " \n " and isMultiline )) then
237+ return " "
238+ end
236239 end )
237240 end
238241
You can’t perform that action at this time.
0 commit comments