From 652e939e255964e4a8569b1b66828d0454344d9d Mon Sep 17 00:00:00 2001 From: Chanjun <15755396353@163.com> Date: Mon, 25 Sep 2017 14:37:12 +0800 Subject: [PATCH] fix line number bug rt --- lib/luafish/parser.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/luafish/parser.lua b/lib/luafish/parser.lua index 32ff258..892172c 100644 --- a/lib/luafish/parser.lua +++ b/lib/luafish/parser.lua @@ -161,7 +161,7 @@ function M.update_linecol(s, i, i_last, nline, ncol) end for k=i_last+1,i do - if k == 1 or s:match('^\n',k-1) then + if k - 1 == 1 or s:match('^\n',k-1) then nline = nline + 1 ncol = 0 end