From e701d86be75a3fbdfb5ef18b029f7033226fd832 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 25 Jul 2023 14:36:00 +0800 Subject: fix more format separator cases. --- src/3rdParty/LuaMinify.h | 6 ++++-- 1 file 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) return '' end local aa = '' - local spaceSep = b:sub(1,1) == ' ' + local b1 = b:sub(1,1) + local spaceSep = b1 == ' ' or b1 == '\n' for i = #out, 1, -1 do local a = out[i] - if a:sub(-1,-1) == ' ' then + local a1 = a:sub(-1,-1) + if a1 == ' ' or a1 == '\n' then spaceSep = true end aa = a:match("([^%s])%s*$") -- cgit v1.2.3-55-g6feb