Shrink library update

Now also regard \t as space.
master
Kirigaya Kazuto 2018-11-30 03:13:09 +08:00
parent 360678c75d
commit 56c48d1ed6
1 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,6 @@
-- Shrink
-- Created by Kiritow
local function shrink(source)
local len=string.len(source)
local qouted=nil
@ -10,7 +13,7 @@ local function shrink(source)
qouted=this
last_space=false
output=output .. this
elseif(this==' ' or this=='\n' or this=='\r') then
elseif(this==' ' or this=='\n' or this=='\r' or this=='\t') then
if(not last_space) then
last_space=true
output=output .. ' '
@ -32,3 +35,4 @@ local function shrink(source)
return output
end
return shrink