From 6aa42e8f92bd8bea49b7b2accfe4ab67a5344e41 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 24 Jan 2025 13:01:25 +0000 Subject: fix: resolve all remaining LuaLS diagnostics --- runtime/lua/tohtml.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'runtime/lua/tohtml.lua') 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]]) + do if type(k) == 'number' and k > true_line_len then true_line_len = k end -- cgit