fix(lua): luap injection (#5275)

* fix(lua): luap injection

* test(lua): check for incorrect hlgroup of injected luap

* chore(lua): injections styling

* chore(lua): ignore luacheck for test.lua
This commit is contained in:
TheLeoP 2023-08-17 21:17:04 -05:00 committed by GitHub
parent 3073b093d0
commit bbb92b2b8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 5 deletions

View file

@ -1,3 +1,4 @@
-- luacheck: ignore
local a = { 1, 2, 3, 4, 5 }
-- ^ number ^ punctuation.bracket
-- ^ variable
@ -11,3 +12,7 @@ _ = next(a)
next(a)
-- ^ function.builtin
-- Checking for incorrect hlgroup of injected luap
string.match(s, "\0%d[^\n]+")
-- ^ !constant