diff options
author | Li Jin <dragon-fly@qq.com> | 2023-07-25 14:36:00 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2023-07-25 14:36:00 +0800 |
commit | e701d86be75a3fbdfb5ef18b029f7033226fd832 (patch) | |
tree | 31b65ec828be48380307cf7adad9fe730a056357 /src/3rdParty/LuaMinify.h | |
parent | 81271283d1311340daf133ec8ba20a15ced401ad (diff) | |
download | yuescript-e701d86be75a3fbdfb5ef18b029f7033226fd832.tar.gz yuescript-e701d86be75a3fbdfb5ef18b029f7033226fd832.tar.bz2 yuescript-e701d86be75a3fbdfb5ef18b029f7033226fd832.zip |
fix more format separator cases.
Diffstat (limited to 'src/3rdParty/LuaMinify.h')
-rw-r--r-- | src/3rdParty/LuaMinify.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/3rdParty/LuaMinify.h b/src/3rdParty/LuaMinify.h index 05bb0b8..c68097b 100644 --- a/src/3rdParty/LuaMinify.h +++ b/src/3rdParty/LuaMinify.h | |||
@@ -2093,10 +2093,12 @@ local function FormatYue(ast, lineMap) | |||
2093 | return '' | 2093 | return '' |
2094 | end | 2094 | end |
2095 | local aa = '' | 2095 | local aa = '' |
2096 | local spaceSep = b:sub(1,1) == ' ' | 2096 | local b1 = b:sub(1,1) |
2097 | local spaceSep = b1 == ' ' or b1 == '\n' | ||
2097 | for i = #out, 1, -1 do | 2098 | for i = #out, 1, -1 do |
2098 | local a = out[i] | 2099 | local a = out[i] |
2099 | if a:sub(-1,-1) == ' ' then | 2100 | local a1 = a:sub(-1,-1) |
2101 | if a1 == ' ' or a1 == '\n' then | ||
2100 | spaceSep = true | 2102 | spaceSep = true |
2101 | end | 2103 | end |
2102 | aa = a:match("([^%s])%s*$") | 2104 | aa = a:match("([^%s])%s*$") |