aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/tohtml.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2025-01-24 13:01:25 +0000
committerLewis Russell <me@lewisr.dev>2025-01-27 16:37:50 +0000
commit6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41 (patch)
tree5695108458a60f19e56834e9889ea58fc9c8c32d /runtime/lua/tohtml.lua
parent83479b95abae84b4b2b4a0331503298ddc5ff47b (diff)
downloadrneovim-6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41.tar.gz
rneovim-6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41.tar.bz2
rneovim-6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41.zip
fix: resolve all remaining LuaLS diagnostics
Diffstat (limited to 'runtime/lua/tohtml.lua')
-rw-r--r--runtime/lua/tohtml.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/runtime/lua/tohtml.lua b/runtime/lua/tohtml.lua
index 1402dfe494..4415a8cdca 100644
--- a/runtime/lua/tohtml.lua
+++ b/runtime/lua/tohtml.lua
@@ -317,7 +317,7 @@ end
--- @return nil|integer
local function register_hl(state, hl)
if type(hl) == 'table' then
- hl = hl[#hl]
+ hl = hl[#hl] --- @type string|integer
end
if type(hl) == 'nil' then
return
@@ -1162,7 +1162,9 @@ local function extend_pre(out, state)
s = s .. _pre_text_to_html(state, row)
end
local true_line_len = #line + 1
- for k in pairs(style_line) do
+ for k in
+ pairs(style_line --[[@as table<string,any>]])
+ do
if type(k) == 'number' and k > true_line_len then
true_line_len = k
end