mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-25 23:24:35 +00:00
made stringx.deindent remove all trailing empties rather than just one
This commit is contained in:
parent
9f5dfcb923
commit
24fde1c157
@ -206,9 +206,9 @@ function stringx.deindent(s, keep_trailing_empty)
|
||||
table.insert(res, line)
|
||||
end
|
||||
|
||||
--should
|
||||
--should we keep any trailing empty lines?
|
||||
if not keep_trailing_empty then
|
||||
if res[#res] == "" then
|
||||
while res[#res] == "" do
|
||||
table.remove(res)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user