-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
bugSomething isn't workingSomething isn't working
Description
E.g.
hzj_jie@hzj-jie-x61t - Mon May 12-23:42:21:~/git/koreader-202411$ cat test.lua
local function f()
local a = "ab"
a = a:gsub("a".. -- "
'b', function() return "c" end)
print(a)
end
f()
should return "c"
hzj_jie@hzj-jie-x61t - Mon May 12-23:42:20:~/git/koreader-202411$ luajit test.lua
c
By using the following version and stylua.toml,
hzj_jie@hzj-jie-x61t - Mon May 12-23:42:32:~/git/koreader-202411$ ./stylua --version
stylua 2.1.0
hzj_jie@hzj-jie-x61t - Mon May 12-23:42:49:~/git/koreader-202411$ cat stylua.toml
syntax = "LuaJIT"
column_width = 80
indent_type = "Spaces"
indent_width = 2
stylua causes a syntax error,
hzj_jie@hzj-jie-x61t - Mon May 12-23:42:25:~/git/koreader-202411$ ./stylua test.lua
hzj_jie@hzj-jie-x61t - Mon May 12-23:42:29:~/git/koreader-202411$ cat test.lua
local function f()
local a = "ab"
a = a:gsub("a" .. -- ""b", function()
return "c"
end)
print(a)
end
f()
Thank you.
CatsDeservePets
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working