Skip to content

Commit ddd9613

Browse files
committed
Add double quotes around a file headers path when the path contains a space.
1 parent 2a2239c commit ddd9613

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

demo/xtra/DIFF.LUA

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ local function diff_u(fn1,fn2)
55
local function open(fn)local f,e=io.open(fn)if not f then print(e)os.exit(1)end return f end
66
local f1,f2,p,a,d,p1,p2,x,y,B,h,l1,l2=open(fn1),open(fn2),{},{},{},0,0,0,0,{a=0,d=0,l={}}
77
local function FP()
8-
if not h then print("--- "..fn1.."\n+++ "..fn2)h=true end
8+
local function SW(s) return string.match(s,"%s")and '"'..s..'"'or s end
9+
if not h then print("--- "..SW(fn1).."\n+++ "..SW(fn2))h=true end
910
if#p>0 then for _,v in ipairs(p)do table.insert(B.l," "..v)end B.o,B.n=x-#p,y-#p end
1011
p={}end
1112
local function FH()

0 commit comments

Comments
 (0)