From 67c39f5ecae0edc3777b2db0f7e637cafa097d05 Mon Sep 17 00:00:00 2001 From: altermo <107814000+altermo@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:15:41 +0100 Subject: fix(tohtml): disable modeline #32822 Problem: Running :TOhtml with a file containing modeline may generate an invalid modeline in the output. Solution: Add `` to the output. Use vi-compatible modeline format ("set foo:"), to avoid the trailing `-->` being treated as part of the modeline. --- runtime/lua/tohtml.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/lua/tohtml.lua') diff --git a/runtime/lua/tohtml.lua b/runtime/lua/tohtml.lua index 6b8daab2c5..80892f5c60 100644 --- a/runtime/lua/tohtml.lua +++ b/runtime/lua/tohtml.lua @@ -1372,6 +1372,7 @@ local function win_to_html(winid, opt) state_generate_style(state) local html = {} + table.insert(html, '') extend_html(html, function() extend_head(html, global_state) extend_body(html, function() -- cgit